28 #ifndef OST_DATA_INFO_ITEM_H
29 #define OST_DATA_INFO_ITEM_H
31 #include <boost/lexical_cast.hpp>
42 namespace ost {
namespace info {
127 template <
typename T>
Three dimensional vector class, using Real precision.
InfoItem GetItem(const InfoPath &path, bool use_defaults=true) const
void SetFloat(Real d)
set item value as floating point
bool HasAttribute(const String &name) const
returns true if attribute of this names exists
std::vector< String > GetAttributeList() const
returns a list with all attribute names
String GetName() const
retrieve item name
void SetName(const String &n)
rename item
Real AsFloat() const
return item value as floating point
Type GetType() const
retrieve type
String GetComment() const
get comment just above item
void SetValue(const String &val)
set value of item
void RemoveAttribute(const String &name)
remove attribute of given name
String GetValue() const
retrieve value of item
InfoGroup GetParent() const
retrieve parent info group
void SetInt(int i)
set item value as integer
void SetBool(bool b)
set item value as bool
String GetAttribute(const String &name) const
return attribute of given name
void SetVector(const geom::Vec3 &v)
set item value as 3d vector
bool operator!=(const InfoItem &rhs) const
bool AsBool() const
return item value as boolean
int AsInt() const
return item value as integer
geom::Vec3 AsVector() const
return item value as 3d vector
void SetAttribute(const String &name, const String &value)
set attribute of given name, will be created if it does not yet exist
bool operator==(const InfoItem &rhs) const
void SetType(Type t)
force type
encapsulates path to info groups and items
#define DLLEXPORT_OST_INFO
void DLLEXPORT_OST_INFO SetStringInfoItem(InfoGroup ig, const InfoPath &path, const String &val)
void DLLEXPORT_OST_INFO SetBoolInfoItem(InfoGroup ig, const InfoPath &path, bool val)
void DLLEXPORT_OST_INFO SetVectorInfoItem(InfoGroup ig, const InfoPath &path, const geom::Vec3 &val)
void DLLEXPORT_OST_INFO SetFloatInfoItem(InfoGroup ig, const InfoPath &path, Real val)
boost::shared_ptr< detail::EleImpl > ElePtr
T Extract(const info::InfoGroup &g, const String &n)
Convenience function to extract a value from an item.
String DLLEXPORT_OST_INFO GetStringInfoItem(const InfoGroup &ig, const InfoPath &path, const String &def)
Real DLLEXPORT_OST_INFO GetFloatInfoItem(const InfoGroup &ig, const InfoPath &path, Real def)
geom::Vec3 DLLEXPORT_OST_INFO GetVectorInfoItem(const InfoGroup &ig, const InfoPath &path, const geom::Vec3 &def)
bool DLLEXPORT_OST_INFO GetBoolInfoItem(const InfoGroup &ig, const InfoPath &path, bool def)
void DLLEXPORT_OST_INFO SetIntInfoItem(InfoGroup ig, const InfoPath &path, int val)
int DLLEXPORT_OST_INFO GetIntInfoItem(const InfoGroup &ig, const InfoPath &path, int def)