Tulip  4.6.0
Better Visualization Through Research
tlp::GlComposite Class Reference

#include <GlComposite.h>

+ Inheritance diagram for tlp::GlComposite:
+ Collaboration diagram for tlp::GlComposite:

List of all members.

Public Member Functions

 GlComposite (bool deleteComponentsInDestructor=true)
 ~GlComposite ()
void addGlEntity (GlSimpleEntity *entity, const std::string &key)
void deleteGlEntity (const std::string &key, bool informTheEntity=true)
void deleteGlEntity (GlSimpleEntity *entity, bool informTheEntity=true)
GlSimpleEntityfindGlEntity (const std::string &key)
std::string findKey (GlSimpleEntity *entity)
const std::map< std::string,
GlSimpleEntity * > & 
getGlEntities () const
virtual void getXML (std::string &outString)
void reset (bool deleteElems)
void setDeleteComponentsInDestructor (bool deleteComponentsInDestructor)
virtual void setStencil (int stencil)
virtual void setWithXML (const std::string &inString, unsigned int &currentPosition)
virtual void translate (const Coord &mouvement)

Protected Attributes

std::list< GlSimpleEntity * > _sortedElements
bool deleteComponentsInDestructor
std::map< std::string,
GlSimpleEntity * > 
elements
std::vector< GlLayer * > layerParents

Detailed Description

GlSimpleEntity used to agregate other GlEntity.

This class provide basic container to manage other GlEntity

See also:
GlSimpleEntity

Definition at line 39 of file GlComposite.h.


Constructor & Destructor Documentation

tlp::GlComposite::GlComposite ( bool  deleteComponentsInDestructor = true)

Constructor.

Parameters:
deleteComponentsInDestructorif true : call delete on components when the GlComposite is delete

Member Function Documentation

void tlp::GlComposite::addGlEntity ( GlSimpleEntity entity,
const std::string &  key 
)

Add new entity with name : key.

The composite does not takes the entity's ownership, i.e. it is not its responsibility to delete it.

void tlp::GlComposite::deleteGlEntity ( const std::string &  key,
bool  informTheEntity = true 
)

Remove entity with name : key.

The entity is not deleted

void tlp::GlComposite::deleteGlEntity ( GlSimpleEntity entity,
bool  informTheEntity = true 
)

Remove given entity.

The entity is not deleted

GlSimpleEntity* tlp::GlComposite::findGlEntity ( const std::string &  key)

Find entity with name : key.

std::string tlp::GlComposite::findKey ( GlSimpleEntity entity)

Find name of given entity.

const std::map<std::string, GlSimpleEntity*>& tlp::GlComposite::getGlEntities ( ) const [inline]

Return map of entities in composite.

Definition at line 91 of file GlComposite.h.

virtual void tlp::GlComposite::getXML ( std::string &  outString) [virtual]

Function to export data in outString (in XML format)

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlGraphComposite.

void tlp::GlComposite::reset ( bool  deleteElems)

Clear the composite.

If deleteElems is true, composite's entities are delete

void tlp::GlComposite::setDeleteComponentsInDestructor ( bool  deleteComponentsInDestructor) [inline]

Set if at the destruction of composite, components well be deleted.

Definition at line 112 of file GlComposite.h.

virtual void tlp::GlComposite::setStencil ( int  stencil) [inline, virtual]

Set stencil number for all composite's children.

For more information on stencil :

See also:
GlSimpleEntity

Reimplemented from tlp::GlSimpleEntity.

Definition at line 101 of file GlComposite.h.

virtual void tlp::GlComposite::setWithXML ( const std::string &  inString,
unsigned int &  currentPosition 
) [virtual]

Function to set data with inString (in XML format)

Implements tlp::GlSimpleEntity.

Reimplemented in tlp::GlGraphComposite.

virtual void tlp::GlComposite::translate ( const Coord &  mouvement) [virtual]

translate the composite with children

Reimplemented in tlp::GlAxis.

 All Classes Files Functions Variables Enumerations Enumerator Properties