MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / IfcGlobalId

Method IfcGlobalId

src/ifcparse/IfcGlobalId.cpp:97–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95#endif
96
97IfcParse::IfcGlobalId::IfcGlobalId() {
98 uuid_data_ = gen();
99 std::vector<unsigned char> v(uuid_data_.size());
100 std::copy(uuid_data_.begin(), uuid_data_.end(), v.begin());
101 string_data_ = compress(v.data());
102#if BOOST_VERSION < 104400
103 formatted_string = boost::lexical_cast<std::string>(uuid_data);
104#else
105 formatted_string_ = boost::uuids::to_string(uuid_data_);
106#endif
107
108#ifndef NDEBUG
109 std::vector<unsigned char> test_vector;
110 expand(string_data_, test_vector);
111 boost::uuids::uuid test_uuid;
112 std::copy(test_vector.begin(), test_vector.end(), test_uuid.begin());
113 if (uuid_data_ != test_uuid) {
114 Logger::Message(Logger::LOG_ERROR, "Internal error generating GlobalId");
115 }
116#endif
117}
118
119IfcParse::IfcGlobalId::IfcGlobalId(const std::string& string)
120 : string_data_(string) {

Callers

nothing calls this directly

Calls 9

copyFunction · 0.85
to_stringFunction · 0.85
MessageClass · 0.85
dataMethod · 0.80
compressFunction · 0.70
expandFunction · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected