InfoItem Class Reference

#include <info_item.hh>

Public Member Functions

InfoGroup GetParent () const
String GetName () const
void SetName (const String &n)
String GetValue () const
void SetValue (const String &val)
Type GetType () const
void SetType (Type t)
void SetType (int t)
Real AsFloat () const
int AsInt () const
bool AsBool () const
geom::Vec3 AsVector () const
void SetFloat (Real d)
void SetInt (int i)
void SetBool (bool b)
void SetVector (const geom::Vec3 &v)
String GetAttribute (const String &name) const
void SetAttribute (const String &name, const String &value)
bool HasAttribute (const String &name) const
void RemoveAttribute (const String &name)
String GetComment () const
std::vector< StringGetAttributeList () const
bool operator== (const InfoItem &rhs) const
bool operator!= (const InfoItem &rhs) const

Friends

class InfoGroup

Detailed Description

Definition at line 44 of file info_item.hh.


Member Function Documentation

bool AsBool (  )  const

return item value as boolean

Real AsFloat (  )  const

return item value as floating point

int AsInt (  )  const

return item value as integer

geom::Vec3 AsVector (  )  const

return item value as 3d vector

String GetAttribute ( const String name  )  const

return attribute of given name

std::vector<String> GetAttributeList (  )  const

returns a list with all attribute names

String GetComment (  )  const

get comment just above item

String GetName (  )  const

retrieve item name

InfoGroup GetParent (  )  const

retrieve parent info group

Type GetType (  )  const

retrieve type

type refers to the encoding of the item, which is one of STRING (default), INT, FLOAT, BOOL or VECTOR (see InfoItem::Type)

String GetValue (  )  const

retrieve value of item

returns the String representation of the value

bool HasAttribute ( const String name  )  const

returns true if attribute of this names exists

bool operator!= ( const InfoItem rhs  )  const
bool operator== ( const InfoItem rhs  )  const
void RemoveAttribute ( const String name  ) 

remove attribute of given name

void SetAttribute ( const String name,
const String value 
)

set attribute of given name, will be created if it does not yet exist

void SetBool ( bool  b  ) 

set item value as bool

void SetFloat ( Real  d  ) 

set item value as floating point

void SetInt ( int  i  ) 

set item value as integer

void SetName ( const String n  ) 

rename item

void SetType ( int  t  ) 
void SetType ( Type  t  ) 

force type

void SetValue ( const String val  ) 

set value of item

this sets the value as a String

void SetVector ( const geom::Vec3 v  ) 

set item value as 3d vector


Friends And Related Function Documentation

friend class InfoGroup [friend]

Definition at line 45 of file info_item.hh.


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

Generated on 1 Mar 2018 for OpenStructure by  doxygen 1.6.1