mitk::PropertyList::Pointer mitk::PersistenceService::GetPropertyList(std::string &id, bool *existed) { this->Initialize(); mitk::PropertyList::Pointer propList; if (id.empty()) { UIDGenerator uidGen; id = uidGen.GetUID(); } std::map<std::string, mitk::PropertyList::Pointer>::iterator it = m_PropertyLists.find(id); if (it == m_PropertyLists.end()) { propList = PropertyList::New(); m_PropertyLists[id] = propList; if (existed) *existed = false; } else { propList = (*it).second; if (existed) *existed = true; } return propList; }
ESEnumType::ESEnumType(const string& EnumTypeName, const vector<string>& EnumConstructors) : ESFixedTypeBase(BaseTypeEnum, SMTType()), EnumTypeName(EnumTypeName) { for (auto const& Constructor : EnumConstructors) { EnumTypeConstructorSet.insert(Constructor); auto ValUID = (EnumValueID)EnumValueUIDGenerator.GetUID(); EnumValueIDToNameMap[ValUID] = Constructor; EnumNameToValueIDMap[Constructor] = ValUID; EnumValueIDSet.insert(ValUID); EnumValueIDs.push_back(ValUID); } }
ESTypeBase::ESTypeBase(BaseType BType) : BType(BType), TypeUID((TypeID)TypeUIDGenerator.GetUID()), HashValid(false) { // Nothng here }