vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vrecko::Attribute Class Reference

#include <Attribute.h>

Inheritance diagram for vrecko::Attribute:
vrecko::DynamicAttribute vrecko::StaticAttribute< type, tval, tref >

Public Types

enum  DataType {
  TYPE_BOOL, TYPE_INT, TYPE_LONG, TYPE_FLOAT,
  TYPE_DOUBLE, TYPE_STRING, TYPE_VEC2, TYPE_VEC3,
  TYPE_VEC4, TYPE_MATRIX, TYPE_QUAT, TYPE_DYNAMIC
}
 

Public Member Functions

const string & getName () const
 
DataType getDataType () const
 
const string & getDescription () const
 
bool isStatic () const
 
bool isDynamic () const
 

Protected Member Functions

 Attribute (const string &strName, DataType dataType, const string &strDescription)
 
 Attribute (const Attribute &attribute)
 

Detailed Description

Represents a general attribute class.

You cannot create any instances of this class, use subclasses. This class is meant solely as an abstract parent class for classes StaticAttribute and DynamicAttribute.

See Also
StaticAttribute
DynamicAttribute

Member Enumeration Documentation

Data types enumeration.

All basic and object data types are pronounced static. By dynamic attributes we mean attributes which can be composed of one or more static attributes. The thing is that a dynamic attribute doesn't have to have any instances; instances can be created and manipulated. On the other hand, static attributes cannot be removed or created, it's only possible to set their values.

Enumerator
TYPE_BOOL 

boolean attribute

TYPE_INT 

integer attribute

TYPE_LONG 

long attribute

TYPE_FLOAT 

float attribute

TYPE_DOUBLE 

double attribute

TYPE_STRING 

string attribute

TYPE_VEC2 

two-dimensional vector attribute

TYPE_VEC3 

three-dimensional vector attribute

TYPE_VEC4 

four-dimensional vector attribute

TYPE_MATRIX 

matrix attribute

TYPE_QUAT 

quaternion attribute

TYPE_DYNAMIC 

dynamic (structured) attribute

Constructor & Destructor Documentation

vrecko::Attribute::Attribute ( const string &  strName,
DataType  dataType,
const string &  strDescription 
)
inlineprotected

Constructs an Attribute object.

Parameters
strNamereference to a constant attribute name
dataTypeattribute data type identificator
strDescriptionreference to a constant attribute description
vrecko::Attribute::Attribute ( const Attribute attribute)
inlineprotected

Constructs an Attribute object by copying an existing one.

Parameters
attributea reference to a constant Attribute instance

Member Function Documentation

DataType vrecko::Attribute::getDataType ( ) const
inline

Returns attribute data type identificator.

Returns
attribute data type identificator
const string& vrecko::Attribute::getDescription ( ) const
inline

Returns attribute description.

Returns
reference to a constant attribute description
const string& vrecko::Attribute::getName ( ) const
inline

Returns attribute name.

Returns
reference to a constant attribute name
bool vrecko::Attribute::isDynamic ( ) const
inline

"Is dynamic" predicate.

Returns
true if the attribute is dynamic, false otherwise
bool vrecko::Attribute::isStatic ( ) const
inline

"Is static" predicate.

Returns
true if the attribute is static, false otherwise

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