public abstract

Inheritance Graph

graph BT
	GenericAttribute
	NodeInfo --> GenericAttribute
	BoolAttribute --> GenericAttribute
	GenericAttributeList --> GenericAttribute
	GenericAttributeMap --> GenericAttribute
	GenericNumberAttribute --> GenericAttribute
	GenericStringAttribute --> GenericAttribute
	WrapperAttribute --> GenericAttribute
	WrapperAttribute --> GenericAttribute
	click GenericAttribute "classUtil_1_1GenericAttribute"
	click NodeInfo "classMinSG_1_1OccRenderer_1_1NodeInfo"
	click BoolAttribute "classUtil_1_1BoolAttribute"
	click GenericAttributeList "classUtil_1_1GenericAttributeList"
	click GenericAttributeMap "classUtil_1_1GenericAttributeMap"
	click GenericNumberAttribute "classUtil_1_1GenericNumberAttribute"
	click GenericStringAttribute "classUtil_1_1GenericStringAttribute"
	click WrapperAttribute "classUtil_1_1WrapperAttribute"
	click WrapperAttribute "classUtil_1_1WrapperAttribute"

Description

Abstract base class of all generic attributes. A generic attribute is used to store arbitrary types of data into a location.

Public Types

   
   
typedef GenericAttributeMap Map
   
typedef GenericAttributeList List
   
typedef GenericAttribute attr_t

Public Static Functions

       
template< typename value_t >      
std::enable_if< std::is_same< typename std::decay< value_t >::type, bool >::value, BoolAttribute * >::type create(value_t && value)    
template< typename value_t >      
std::enable_if<(std::is_integral< typename std::decay< value_t >::type >::value   std::is_floating_point< typename std::decay< value_t >::type >::value)&&!std::is_same< typename std::decay< value_t >::type, bool >::value, _NumberAttribute < typename std::decay< value_t >::type > * >::type create(value_t && value)
template< typename value_t >      
std::enable_if< std::is_same< typename std::decay< value_t >::type, std::string >::value, _StringAttribute < std::string > * >::type create(value_t && value)    
       
StringAttribute * createString(const std::string & s)    
       
StringAttribute * createString(std::string && s)    
       
StringAttribute * createString( GenericAttribute * a)    
template< typename Number >      
_NumberAttribute < Number > * createNumber(Number f)    
       
BoolAttribute * createBool(bool b)    
template< typename ObjType >      
GenericAttribute * createCountedReference(ObjType * obj)    
template< typename Type >      
GenericAttribute * createUndefined(const Type & value)    

Public Functions

   
   
  ~GenericAttribute()
   
attr_t * clone() const
template< class specificAttr_t >  
bool isA() const
returns true iff the object is of the given type.
   
std::string toString() const
   
double toDouble() const
   
float toFloat() const
   
int toInt() const
   
unsigned int toUnsignedInt() const
   
bool toBool() const
   
std::string toJSON() const
template< class specificAttr_t >  
specificAttr_t * toType()
template< class specificAttr_t >  
const specificAttr_t * toType() const
   
bool operator==(const GenericAttribute & void) const
Per default, the comparison returns false for unspecified types.
   
bool operator!=(const GenericAttribute & other) const

Protected Static Functions

   
template< class specificAttr_t >  
bool _defaultIsEqual(const specificAttr_t * first, const GenericAttribute * second)

Protected Functions

   
   
  GenericAttribute()
   
  GenericAttribute(const GenericAttribute & void)
   
  GenericAttribute( GenericAttribute && void)
   
GenericAttribute & operator=(const GenericAttribute & void)
   
GenericAttribute & operator=( GenericAttribute && void)

Documentation

typedef
Util::GenericAttribute::Map

public
 
 
typedef GenericAttributeMap Map

Defined in Util/GenericAttribute.h:45


typedef
Util::GenericAttribute::List

public
 
 
typedef GenericAttributeList List

Defined in Util/GenericAttribute.h:46


typedef
Util::GenericAttribute::attr_t

public
 
 
typedef GenericAttribute attr_t

Defined in Util/GenericAttribute.h:47


function
Util::GenericAttribute::create

public static inline
     
template< typename value_t >    
std::enable_if< std::is_same< typename std::decay< value_t >::type, bool >::value, BoolAttribute * >::type create( value_t && value )

Factory function to create an appropriate GenericAttribute for the type of the given value.

Parameters

value_t
Template parameter that decides which type of GenericAttribute is constructed
value
Value that is stored in the newly created GenericAttribute

Defined in Util/GenericAttribute.h:60


function
Util::GenericAttribute::create

public static inline
         
template< typename value_t >        
std::enable_if<(std::is_integral< typename std::decay< value_t >::type >::value   std::is_floating_point< typename std::decay< value_t >::type >::value)&&!std::is_same< typename std::decay< value_t >::type, bool >::value, _NumberAttribute < typename std::decay< value_t >::type > * >::type create( value_t && value )

Defined in Util/GenericAttribute.h:67


function
Util::GenericAttribute::create

public static inline
     
template< typename value_t >    
std::enable_if< std::is_same< typename std::decay< value_t >::type, std::string >::value, _StringAttribute < std::string > * >::type create( value_t && value )

Defined in Util/GenericAttribute.h:72


function
Util::GenericAttribute::createString

public static inline
     
     
StringAttribute * createString( const std::string & s )

Encapsulate a standard string into a generic attribute.

Parameters

s
Standard string

Returns

String encapsulated into a generic string attribute

Defined in Util/GenericAttribute.h:82


function
Util::GenericAttribute::createString

public static inline
     
     
StringAttribute * createString( std::string && s )

Defined in Util/GenericAttribute.h:83


function
Util::GenericAttribute::createString

public static
     
     
StringAttribute * createString( GenericAttribute * a )

Convert a generic attribute to a string and encapsulate that string into a generic attribute.

Parameters

a
Arbitrary generic attribute

Returns

String representation of the generic attribute

Defined in Util/GenericAttribute.h:92


function
Util::GenericAttribute::createNumber

public static inline
     
template< typename Number >    
_NumberAttribute < Number > * createNumber( Number f )

Encapsulate a standard number into a generic attribute.

Parameters

f
Standard number

Returns

Number encapsulated into a generic number attribute

Defined in Util/GenericAttribute.h:100


function
Util::GenericAttribute::createBool

public static
     
     
BoolAttribute * createBool( bool b )

Encapsulate a standard bool into a generic attribute.

Parameters

f
Standard bool

Returns

Number encapsulated into a generic bool attribute

Defined in Util/GenericAttribute.h:109


function
Util::GenericAttribute::createCountedReference

public static inline
     
template< typename ObjType >    
GenericAttribute * createCountedReference( ObjType * obj )

Encapsulate a Util::Reference to an object into a generic attribute.

Parameters

f
Standard pointer

Returns

Pointer encapsulated into a generic counted object attribute

Defined in Util/GenericAttribute.h:117


function
Util::GenericAttribute::createUndefined

public static inline
     
template< typename Type >    
GenericAttribute * createUndefined( const Type & value )

Encapsulate an arbitrary type into a generic attribute.

Parameters

value
Standard number

Returns

Arbitrary type encapsulated into a generic undefined attribute

Defined in Util/GenericAttribute.h:126


function
Util::GenericAttribute::~GenericAttribute

public inline virtual
   
   
~GenericAttribute( )

Defined in Util/GenericAttribute.h:131


function
Util::GenericAttribute::clone

public const virtual
   
   
attr_t * clone( ) const

Create a copy of this object.

Returns

Exact copy.

Defined in Util/GenericAttribute.h:139


function
Util::GenericAttribute::isA

public const inline
   
template< class specificAttr_t >  
bool isA( ) const

returns true iff the object is of the given type.

Defined in Util/GenericAttribute.h:143


function
Util::GenericAttribute::toString

public const inline virtual
   
   
std::string toString( ) const

Convert the object to a human-readable string.

Returns

String representation.

Defined in Util/GenericAttribute.h:149


function
Util::GenericAttribute::toDouble

public const inline virtual
   
   
double toDouble( ) const

Convert the object to a floating-point value with double precision.

Returns

Floating-point representation with double precision.

Defined in Util/GenericAttribute.h:155


function
Util::GenericAttribute::toFloat

public const inline virtual
   
   
float toFloat( ) const

Convert the object to a floating-point value.

Returns

Floating-point representation.

Defined in Util/GenericAttribute.h:161


function
Util::GenericAttribute::toInt

public const inline virtual
   
   
int toInt( ) const

Convert the object to an integer value.

Returns

Integer representation.

Defined in Util/GenericAttribute.h:167


function
Util::GenericAttribute::toUnsignedInt

public const inline virtual
   
   
unsigned int toUnsignedInt( ) const

Convert the object to an unsigned integer value.

Returns

Unsigned integer representation.

Defined in Util/GenericAttribute.h:173


function
Util::GenericAttribute::toBool

public const inline virtual
   
   
bool toBool( ) const

Convert the object to an boolean value.

Returns

Boolean representation.

Defined in Util/GenericAttribute.h:179


function
Util::GenericAttribute::toJSON

public const inline virtual
   
   
std::string toJSON( ) const

Convert the object to JavaScript Object Notation (JSON).

Returns

JSON representation;

Defined in Util/GenericAttribute.h:185


function
Util::GenericAttribute::toType

public inline
   
template< class specificAttr_t >  
specificAttr_t * toType( )

Defined in Util/GenericAttribute.h:188


function
Util::GenericAttribute::toType

public const inline
   
template< class specificAttr_t >  
const specificAttr_t * toType( ) const

Defined in Util/GenericAttribute.h:192


function
Util::GenericAttribute::operator==

public const inline virtual
     
     
bool operator==( const GenericAttribute & void ) const

Per default, the comparison returns false for unspecified types.

Defined in Util/GenericAttribute.h:197


function
Util::GenericAttribute::operator!=

public const inline
     
     
bool operator!=( const GenericAttribute & other ) const

Defined in Util/GenericAttribute.h:198


function
Util::GenericAttribute::_defaultIsEqual

protected static inline
     
template< class specificAttr_t >    
bool _defaultIsEqual( const specificAttr_t * first,
  const GenericAttribute * second
)    

Defined in Util/GenericAttribute.h:202


function
Util::GenericAttribute::GenericAttribute

protected
   
   
GenericAttribute( )

Defined in Util/GenericAttribute.h:206


function
Util::GenericAttribute::GenericAttribute

protected
     
     
GenericAttribute( const GenericAttribute & void )

Defined in Util/GenericAttribute.h:207


function
Util::GenericAttribute::GenericAttribute

protected
     
     
GenericAttribute( GenericAttribute && void )

Defined in Util/GenericAttribute.h:208


function
Util::GenericAttribute::operator=

protected
     
     
GenericAttribute & operator=( const GenericAttribute & void )

Defined in Util/GenericAttribute.h:209


function
Util::GenericAttribute::operator=

protected
     
     
GenericAttribute & operator=( GenericAttribute && void )

Defined in Util/GenericAttribute.h:210