RenderTools::AbstractProperty Class Reference

#include <AbstractProperty.h>

Inheritance diagram for RenderTools::AbstractProperty:

RenderTools::InitializeInterface RenderTools::ContainerProperty RenderTools::PointerProperty< T > RenderTools::StringProperty RenderTools::VectorProperty< T > RenderTools::AbstractPropertyContainer RenderTools::EnumProperty< T > RenderTools::PropertyProxy< T > RenderTools::PropertyContainer< PropertyProxy< T > > RenderTools::AbstractApplication RenderTools::Framebuffer RenderTools::Image RenderTools::Program RenderTools::PropertyContainer< T > RenderTools::Renderbuffer RenderTools::Rendergroup RenderTools::Renderpass RenderTools::Stateset RenderTools::TransformNode RenderTools::Vertexbuffer RenderTools::ViewController

List of all members.

Classes

struct  NullDeleter

Public Types

enum  Semantic {
  NONE = 0x0000, MASK = 0x0001, COLOR = 0x0002, SAMPLER = 0x0004,
  MODEL = 0x0008, FILENAME = 0x0010, SHADER = 0x0020, CONTAINER = 0x0040
}
typedef unsigned int SemanticMask

Public Member Functions

 AbstractProperty (void)
virtual ~AbstractProperty (void)
virtual void onPropertyEvent (const PropertyEvent &p)
virtual void createProperties (void)
virtual const string getTypeName (bool ofComponent=false) const
virtual void onInitialize (void)
virtual const string getValue (int vectorElement=-1) const
virtual bool setValue (const string value, int vectorElement=-1)
virtual const void * getPointer (unsigned int offset) const
virtual unsigned int getNumComponents (void) const
virtual unsigned int getNumVectorElements (void) const
virtual void setOwner (const PropertyContainerPtr &owner)
virtual bool isContainer (void) const
virtual bool isString (void) const
virtual bool isInteger (void) const
virtual bool isReal (void) const
virtual bool isBoolean (void) const
virtual bool isEnum (void) const
virtual bool isMatrix (void) const
virtual bool isMultiComponent (void) const
virtual bool isVector (void) const
virtual const XMLNodePtr toXML (const XMLNodePtr &parent=XMLNodePtr()) const
virtual void setName (const XMLNodePtr &xml=XMLNodePtr())
virtual void setName (const string name)
virtual void recalculatePath (void)
void setSemantic (SemanticMask semantic)
 calls remove() then store()
void storePath (void)
void removePath (void)
 store the pointer in the 'registry'
void connect (const PropertyPtr &p, bool send=false)
 remove from registry
void disconnect (const PropertyPtr &p, bool send=false)
void addEventListener (const PropertyPtr &p, bool send=false)
void removeEventListener (const PropertyPtr &p, bool send=false)
void sendPropertyEvent (const PropertyEvent &p)
const PropertyContainerPtr getOwner (void) const
const string & getName (void) const
const string & getPath (void) const
const string tracePath (void) const
const string getDecoratedName (bool includeType=true, bool asVector=true, int vectorElement=-1, int component=-1) const
SemanticMask getSemantic (void) const
weak_ptr< T > getWeakPtr (void)
const weak_ptr< T > getWeakPtr (void) const
shared_ptr< T > getSharedPtr (void)
const shared_ptr< T > getSharedPtr (void) const
shared_ptr< T > getNullDeletingSharedPtr (void)
const shared_ptr< T > getNullDeletingSharedPtr (void) const
weak_ptr< T > getNullDeletingWeakPtr (void)
const shared_ptr< T > getNullDeletingWeakPtr (void) const

Static Public Member Functions

static void clear (void)
static const string find (const PropertyPtr &)
static const PropertyPtr find (const string path)
static const string createName (const string prefix="p")

Protected Attributes

PropertyContainerWeakPtr m_owner
string m_path
string m_name
SemanticMask m_semantic
PropertyWeakList m_eventListeners

Static Protected Attributes

static map< AbstractProperty
*, string > 
s_pointers
static map< string,
PropertyWeakPtr
s_paths
static unsigned long s_counter = 0

Friends

ostream & operator<< (ostream &os, const AbstractProperty &rhs)
const istream & operator>> (const istream &is, AbstractProperty &rhs)


Detailed Description

Definition at line 17 of file AbstractProperty.h.


Member Typedef Documentation

Definition at line 20 of file AbstractProperty.h.


Member Enumeration Documentation

Enumerator:
NONE 
MASK 
COLOR 
SAMPLER 
MODEL 
FILENAME 
SHADER 
CONTAINER 

Definition at line 21 of file AbstractProperty.h.


Constructor & Destructor Documentation

AbstractProperty::AbstractProperty ( void   ) 

Definition at line 14 of file AbstractProperty.cpp.

AbstractProperty::~AbstractProperty ( void   )  [virtual]

immediately remove from registry

Definition at line 123 of file AbstractProperty.cpp.


Member Function Documentation

void AbstractProperty::addEventListener ( const PropertyPtr p,
bool  send = false 
)

Definition at line 202 of file AbstractProperty.cpp.

void AbstractProperty::clear ( void   )  [static]

void AbstractProperty::connect ( const PropertyPtr p,
bool  send = false 
)

remove from registry

Definition at line 217 of file AbstractProperty.cpp.

const string AbstractProperty::createName ( const string  prefix = "p"  )  [static]

Definition at line 119 of file AbstractProperty.cpp.

void AbstractProperty::createProperties ( void   )  [virtual]

void AbstractProperty::disconnect ( const PropertyPtr p,
bool  send = false 
)

Definition at line 223 of file AbstractProperty.cpp.

const PropertyPtr AbstractProperty::find ( const string  path  )  [static]

Definition at line 155 of file AbstractProperty.cpp.

const string AbstractProperty::find ( const PropertyPtr p  )  [static]

Definition at line 168 of file AbstractProperty.cpp.

const string AbstractProperty::getDecoratedName ( bool  includeType = true,
bool  asVector = true,
int  vectorElement = -1,
int  component = -1 
) const

Definition at line 289 of file AbstractProperty.cpp.

const string & AbstractProperty::getName ( void   )  const

Returns:
the container that holds this property

Definition at line 281 of file AbstractProperty.cpp.

const shared_ptr< T > RenderTools::AbstractProperty::getNullDeletingSharedPtr ( void   )  const [inline]

Definition at line 114 of file AbstractProperty.h.

shared_ptr< T > RenderTools::AbstractProperty::getNullDeletingSharedPtr ( void   )  [inline]

Definition at line 108 of file AbstractProperty.h.

const shared_ptr< T > RenderTools::AbstractProperty::getNullDeletingWeakPtr ( void   )  const [inline]

Definition at line 126 of file AbstractProperty.h.

weak_ptr< T > RenderTools::AbstractProperty::getNullDeletingWeakPtr ( void   )  [inline]

Definition at line 120 of file AbstractProperty.h.

unsigned int AbstractProperty::getNumComponents ( void   )  const [virtual]

Definition at line 333 of file AbstractProperty.cpp.

unsigned int AbstractProperty::getNumVectorElements ( void   )  const [virtual]

Reimplemented in RenderTools::VectorProperty< T >.

Definition at line 329 of file AbstractProperty.cpp.

const PropertyContainerPtr AbstractProperty::getOwner ( void   )  const

Definition at line 277 of file AbstractProperty.cpp.

const string & AbstractProperty::getPath ( void   )  const

Returns:
the property name

Definition at line 115 of file AbstractProperty.cpp.

const void * AbstractProperty::getPointer ( unsigned int  offset  )  const [virtual]

Reimplemented in RenderTools::PointerProperty< T >, and RenderTools::StringProperty.

Definition at line 325 of file AbstractProperty.cpp.

AbstractProperty::SemanticMask AbstractProperty::getSemantic ( void   )  const

Definition at line 308 of file AbstractProperty.cpp.

const shared_ptr< T > RenderTools::AbstractProperty::getSharedPtr ( void   )  const [inline]

Definition at line 102 of file AbstractProperty.h.

shared_ptr< T > RenderTools::AbstractProperty::getSharedPtr ( void   )  [inline]

Definition at line 96 of file AbstractProperty.h.

const string AbstractProperty::getTypeName ( bool  ofComponent = false  )  const [virtual]

const string AbstractProperty::getValue ( int  vectorElement = -1  )  const [virtual]

const weak_ptr< T > RenderTools::AbstractProperty::getWeakPtr ( void   )  const [inline]

Definition at line 90 of file AbstractProperty.h.

weak_ptr< T > RenderTools::AbstractProperty::getWeakPtr ( void   )  [inline]

Definition at line 84 of file AbstractProperty.h.

bool AbstractProperty::isBoolean ( void   )  const [virtual]

Reimplemented in RenderTools::PointerProperty< T >.

Definition at line 353 of file AbstractProperty.cpp.

bool AbstractProperty::isContainer ( void   )  const [virtual]

Reimplemented in RenderTools::ContainerProperty.

Definition at line 337 of file AbstractProperty.cpp.

bool AbstractProperty::isEnum ( void   )  const [virtual]

Reimplemented in RenderTools::EnumProperty< T >.

Definition at line 361 of file AbstractProperty.cpp.

bool AbstractProperty::isInteger ( void   )  const [virtual]

Reimplemented in RenderTools::PointerProperty< T >.

Definition at line 345 of file AbstractProperty.cpp.

bool AbstractProperty::isMatrix ( void   )  const [virtual]

Reimplemented in RenderTools::PointerProperty< T >.

Definition at line 357 of file AbstractProperty.cpp.

bool AbstractProperty::isMultiComponent ( void   )  const [virtual]

Reimplemented in RenderTools::PointerProperty< T >.

Definition at line 365 of file AbstractProperty.cpp.

bool AbstractProperty::isReal ( void   )  const [virtual]

Reimplemented in RenderTools::PointerProperty< T >.

Definition at line 349 of file AbstractProperty.cpp.

bool AbstractProperty::isString ( void   )  const [virtual]

Reimplemented in RenderTools::StringProperty.

Definition at line 341 of file AbstractProperty.cpp.

bool AbstractProperty::isVector ( void   )  const [virtual]

Reimplemented in RenderTools::VectorProperty< T >.

Definition at line 369 of file AbstractProperty.cpp.

void AbstractProperty::onInitialize ( void   )  [virtual]

void AbstractProperty::onPropertyEvent ( const PropertyEvent p  )  [virtual]

void AbstractProperty::recalculatePath ( void   )  [virtual]

Reimplemented in RenderTools::AbstractPropertyContainer.

Definition at line 56 of file AbstractProperty.cpp.

void AbstractProperty::removeEventListener ( const PropertyPtr p,
bool  send = false 
)

Definition at line 206 of file AbstractProperty.cpp.

void AbstractProperty::removePath ( void   ) 

store the pointer in the 'registry'

Definition at line 61 of file AbstractProperty.cpp.

void AbstractProperty::sendPropertyEvent ( const PropertyEvent p  ) 

then call the event listeners

Definition at line 191 of file AbstractProperty.cpp.

void AbstractProperty::setName ( const string  name  )  [virtual]

Reimplemented in RenderTools::AbstractPropertyContainer.

Definition at line 43 of file AbstractProperty.cpp.

void AbstractProperty::setName ( const XMLNodePtr xml = XMLNodePtr()  )  [virtual]

Reimplemented in RenderTools::AbstractPropertyContainer.

Definition at line 19 of file AbstractProperty.cpp.

void AbstractProperty::setOwner ( const PropertyContainerPtr owner  )  [virtual]

unregister the pointer

set the owner (now the path changes)

re-register the pointer with the new path

Reimplemented in RenderTools::AbstractPropertyContainer.

Definition at line 265 of file AbstractProperty.cpp.

void AbstractProperty::setSemantic ( SemanticMask  semantic  ) 

calls remove() then store()

Definition at line 312 of file AbstractProperty.cpp.

bool AbstractProperty::setValue ( const string  value,
int  vectorElement = -1 
) [virtual]

void AbstractProperty::storePath ( void   ) 

Definition at line 73 of file AbstractProperty.cpp.

const XMLNodePtr AbstractProperty::toXML ( const XMLNodePtr parent = XMLNodePtr()  )  const [virtual]

a 'flat' property (ie not a container) is described by it's name as tag and the value from getValue() in the attribute 'value' <m_name type="getTypeName()" value="">

Reimplemented in RenderTools::AbstractPropertyContainer.

Definition at line 178 of file AbstractProperty.cpp.

const string AbstractProperty::tracePath ( void   )  const

Returns:
m_path

break cycles in the path

Definition at line 241 of file AbstractProperty.cpp.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const AbstractProperty rhs 
) [friend]

Definition at line 373 of file AbstractProperty.cpp.

const istream& operator>> ( const istream &  is,
AbstractProperty rhs 
) [friend]

Definition at line 377 of file AbstractProperty.cpp.


Member Data Documentation

Definition at line 139 of file AbstractProperty.h.

Definition at line 137 of file AbstractProperty.h.

Definition at line 135 of file AbstractProperty.h.

Definition at line 136 of file AbstractProperty.h.

Definition at line 138 of file AbstractProperty.h.

unsigned long AbstractProperty::s_counter = 0 [static, protected]

Definition at line 143 of file AbstractProperty.h.

map< string, PropertyWeakPtr > AbstractProperty::s_paths [static, protected]

Definition at line 142 of file AbstractProperty.h.

map< AbstractProperty *, string > RenderTools::AbstractProperty::s_pointers [static, protected]

Definition at line 141 of file AbstractProperty.h.


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

Generated on Wed Jan 26 00:15:37 2011 for RenderTools by  doxygen 1.5.8