54 std::map<std::string, std::shared_ptr<GenericData>>::iterator iter;
56 iter = propMap_.find(genData->getID());
58 if (iter == propMap_.end()) {
59 propMap_.insert(std::make_pair(genData->getID(), genData));
61 iter->second = genData;
66 std::map<std::string, std::shared_ptr<GenericData>>::iterator iter;
68 iter = propMap_.find(propName);
70 if (iter != propMap_.end()) {
80 std::vector<std::string> propNames;
81 std::map<std::string, std::shared_ptr<GenericData>>::iterator iter;
83 for (iter = propMap_.begin(); iter != propMap_.end(); ++iter)
84 propNames.push_back(iter->first);
90 std::vector<std::shared_ptr<GenericData>> properties;
91 std::map<std::string, std::shared_ptr<GenericData>>::iterator iter;
93 for (iter = propMap_.begin(); iter != propMap_.end(); ++iter)
94 properties.push_back(iter->second);
100 std::map<std::string, std::shared_ptr<GenericData>>::iterator iter;
102 iter = propMap_.find(propName);
104 if (iter != propMap_.end())
111 const std::string& propName) {
112 std::map<std::string, std::shared_ptr<GenericData>>::iterator iter;
114 iter = propMap_.find(propName);
116 if (iter != propMap_.end())
std::shared_ptr< GenericData > getPropertyByName(const std::string &propName)
Returns property.
std::vector< std::shared_ptr< GenericData > > getProperties()
Returns all of the properties in PropertyMap.
void addProperty(std::shared_ptr< GenericData > genData)
Adds property into property map.
bool removeProperty(const std::string &propName)
Removes property from PropertyMap by name.
bool hasProperty(const std::string &propName)
Checks if property is in this PropertyMap.
std::vector< std::string > getPropertyNames()
Returns all names of properties.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.