Public Member Functions | Protected Attributes

OBSetData Class Reference

Used to store arbitrary attribute/set relationships. Should be used to store a set of OBGenericData based on an attribute. More...

#include <openbabel/generic.h>

Inheritance diagram for OBSetData:
OBGenericData

List of all members.

Public Member Functions

 OBSetData ()
virtual OBGenericDataClone (OBBase *) const
void AddData (OBGenericData *d)
void SetData (std::vector< OBGenericData * > &vdata)
OBGenericDataGetData (const char *s)
OBGenericDataGetData (const std::string &s)
virtual const std::vector
< OBGenericData * > & 
GetData () const
std::vector< OBGenericData * >
::iterator 
GetBegin ()
std::vector< OBGenericData * >
::iterator 
GetEnd ()
void DeleteData (OBGenericData *gd)
void SetAttribute (const std::string &v)
void SetOrigin (const DataOrigin s)
virtual const std::string & GetAttribute () const
unsigned int GetDataType () const
virtual const std::string & GetValue () const
virtual DataOrigin GetOrigin () const

Protected Attributes

std::vector< OBGenericData * > _vdata
std::string _attr
unsigned int _type
DataOrigin _source

Detailed Description

Used to store arbitrary attribute/set relationships. Should be used to store a set of OBGenericData based on an attribute.


Constructor & Destructor Documentation

OBSetData (  ) [inline]

Member Function Documentation

virtual OBGenericData* Clone ( OBBase  ) const [inline, virtual]

Reimplemented from OBGenericData.

void AddData ( OBGenericData d ) [inline]

Add an OBGenericData element to the set.

void SetData ( std::vector< OBGenericData * > &  vdata ) [inline]

Set the array of data to a new vector.

OBGenericData* GetData ( const char *  s ) [inline]
Returns:
the OBGenericData associate with the attribute name parameter.
OBGenericData* GetData ( const std::string &  s ) [inline]
Returns:
the OBGenericData associate with the attribute name parameter.
virtual const std::vector<OBGenericData *>& GetData (  ) const [inline, virtual]

Gets the entire set.

std::vector<OBGenericData*>::iterator GetBegin (  ) [inline]

Get the begin iterator.

std::vector<OBGenericData*>::iterator GetEnd (  ) [inline]

Get the end iterator.

void DeleteData ( OBGenericData gd ) [inline]

Delete the matching OBGenericData element.

void SetAttribute ( const std::string &  v ) [inline, inherited]
void SetOrigin ( const DataOrigin  s ) [inline, inherited]
virtual const std::string& GetAttribute (  ) const [inline, virtual, inherited]
Returns:
The attribute (key), which can be used to retrieve this data

Referenced by OBMoleculeFormat::MakeCombinedMolecule().

unsigned int GetDataType (  ) const [inline, inherited]
Returns:
the data type for this object as defined in OBGenericDataType
virtual const std::string& GetValue (  ) const [inline, virtual, inherited]

Base class returns a default value (the attribute type) but should never be called.

Reimplemented in OBCommentData, and OBPairData.

Referenced by OBDepict::DrawMolecule(), OBDescriptor::FilterCompare(), and OBDescriptor::GetValues().

virtual DataOrigin GetOrigin (  ) const [inline, virtual, inherited]

Member Data Documentation

std::vector<OBGenericData *> _vdata [protected]
std::string _attr [protected, inherited]

attribute tag (e.g., "UnitCell", "Comment" or "Author")

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

unsigned int _type [protected, inherited]

attribute type -- declared for each subclass

Referenced by OBRotamerList::Clone(), and OBNasaThermoData::OBNasaThermoData().

DataOrigin _source [protected, inherited]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines