OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::PropertyMap Class Reference

#include <PropertyMap.hpp>

Public Member Functions

 PropertyMap ()
 
virtual ~PropertyMap ()
 
void addProperty (GenericData *genData)
 
bool removeProperty (const std::string &propName)
 
void clearProperties ()
 
std::vector< std::string > getPropertyNames ()
 
std::vector< GenericData * > getProperties ()
 
bool hasProperty (const std::string &propName)
 
GenericDatagetPropertyByName (const std::string &propName)
 

Protected Attributes

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

Private Member Functions

 PropertyMap (const PropertyMap &)
 
PropertyMapoperator= (const PropertyMap &)
 

Detailed Description

PropertyMap class maintains a list of GenericData. Type of Property is actually GenericData.

Definition at line 65 of file PropertyMap.hpp.

Constructor & Destructor Documentation

◆ PropertyMap() [1/2]

OpenMD::PropertyMap::PropertyMap ( )
inline

◆ ~PropertyMap()

OpenMD::PropertyMap::~PropertyMap ( )
virtual

Virtual Destructor responsible for deleting all of the generc data in PropertyMap

Definition at line 49 of file PropertyMap.cpp.

References clearProperties().

Referenced by PropertyMap().

◆ PropertyMap() [2/2]

OpenMD::PropertyMap::PropertyMap ( const PropertyMap )
private

prevent copy constructing

Member Function Documentation

◆ addProperty()

void OpenMD::PropertyMap::addProperty ( GenericData genData)

◆ clearProperties()

◆ getProperties()

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

◆ getPropertyByName()

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 122 of file PropertyMap.cpp.

References propMap_.

Referenced by OpenMD::NonBondedInteractionType::getPropertyByName(), OpenMD::ShortRangeInteraction::getPropertyByName(), OpenMD::Molecule::getPropertyByName(), OpenMD::SimInfo::getPropertyByName(), OpenMD::StuntDouble::getPropertyByName(), and PropertyMap().

◆ getPropertyNames()

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

◆ 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 111 of file PropertyMap.cpp.

References propMap_.

Referenced by PropertyMap().

◆ operator=()

PropertyMap& OpenMD::PropertyMap::operator= ( const PropertyMap )
private

prevent copy assignment

◆ removeProperty()

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

Member Data Documentation

◆ propMap_

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

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