OpenMD 3.2
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
OpenMD::PropertyMap Class Reference

PropertyMap class maintains a list of GenericData. More...

#include <PropertyMap.hpp>

Public Member Functions

 PropertyMap ()
 trivial constructor
virtual ~PropertyMap ()=default
 Virtual Destructor responsible for deleting all of the generc data 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.
std::vector< std::string > getPropertyNames ()
 Returns all names of properties.
std::vector< std::shared_ptr< GenericData > > getProperties ()
 Returns all of the properties in PropertyMap.
bool hasProperty (const std::string &propName)
 Checks if property is in this PropertyMap.
std::shared_ptr< GenericDatagetPropertyByName (const std::string &propName)
 Returns property.

Protected Attributes

std::map< std::string, std::shared_ptr< GenericData > > propMap_

Detailed Description

PropertyMap class maintains a list of GenericData.

Type of Property is actually GenericData.

Definition at line 72 of file PropertyMap.hpp.

Constructor & Destructor Documentation

◆ PropertyMap()

OpenMD::PropertyMap::PropertyMap ( )
inline

trivial constructor

Definition at line 75 of file PropertyMap.hpp.

Referenced by ~PropertyMap().

Member Function Documentation

◆ addProperty()

void OpenMD::PropertyMap::addProperty ( std::shared_ptr< GenericData > genData)

Adds property into property map.

Parameters
genDataGenericData to be added into PropertyMap
See also
removeProperty
#clearProperties

Definition at line 56 of file PropertyMap.cpp.

◆ getProperties()

std::vector< std::shared_ptr< GenericData > > OpenMD::PropertyMap::getProperties ( )

Returns all of the properties in PropertyMap.

Returns
all of the properties in PropertyMap
See also
getPropertyByName

Definition at line 92 of file PropertyMap.cpp.

◆ getPropertyByName()

std::shared_ptr< GenericData > OpenMD::PropertyMap::getPropertyByName ( const std::string & propName)

Returns property.

Parameters
propNamename of property
Returns
a pointer point to property with propName. If no property named propName exists, return NULL
See also
getProperties

Definition at line 113 of file PropertyMap.cpp.

◆ getPropertyNames()

std::vector< std::string > OpenMD::PropertyMap::getPropertyNames ( )

Returns all names of properties.

Returns
all names of properties

Definition at line 82 of file PropertyMap.cpp.

◆ hasProperty()

bool OpenMD::PropertyMap::hasProperty ( const std::string & propName)

Checks if property is in this PropertyMap.

Parameters
propNamename of property
Returns
boolean
See also
getProperties, getPropertyByName

Definition at line 102 of file PropertyMap.cpp.

◆ removeProperty()

bool OpenMD::PropertyMap::removeProperty ( const std::string & propName)

Removes property from PropertyMap by name.

Parameters
propNamethe name of property to be removed
See also
addProperty
#clearProperties

Definition at line 68 of file PropertyMap.cpp.

Member Data Documentation

◆ propMap_

std::map<std::string, std::shared_ptr<GenericData> > OpenMD::PropertyMap::propMap_
protected

Definition at line 145 of file PropertyMap.hpp.


The documentation for this class was generated from the following files: