ALBA
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaVMERoot Class Reference

#include <albaVMERoot.h>

Inheritance diagram for albaVMERoot:
Inheritance graph
[legend]
Collaboration diagram for albaVMERoot:
Collaboration graph
[legend]

Public Types

enum  ROOT_GUI_ID { ID_APPLICATION_STAMP = Superclass::ID_LAST , ID_LAST }
 
- Public Types inherited from albaVME
enum  VME_WIDGET_ID { ID_NAME = MINID , ID_PRINT_INFO , ID_HELP , ID_LAST }
 
enum  VME_VISUAL_MODE { DEFAULT_VISUAL_MODE = 0 , NO_DATA_VISUAL_MODE }
 
typedef std::vector< albaAutoPointer< albaVME > > albaChildrenVector
 
typedef std::map< albaString, albaAutoPointer< albaAttribute > > albaAttributesMap
 
typedef std::map< albaString, albaVMELinkalbaLinksMap
 
typedef std::set< albaVME * > albaVMESet
 
typedef std::vector< albaVMEBackLinkalbaVMEBackLinks
 

Public Member Functions

 albaTypeMacro (albaVMERoot, albaVME)
 
virtual bool Equals (albaVME *vme)
 
virtual int DeepCopy (albaVME *a)
 
albaID GetMaxItemId ()
 
albaID GetNextItemId ()
 
void SetMaxItemId (albaID id)
 
void ResetMaxItemId ()
 
void CleanTree ()
 
virtual void SetMatrix (const albaMatrix &mat)
 
virtual void Print (std::ostream &os, const int tabs=0)
 
virtual void GetLocalTimeStamps (std::vector< albaTimeStamp > &kframes)
 
void OnEvent (albaEventBase *alba_event)
 
virtual void Update ()
 
virtual albaString GetVisualPipe ()
 
virtual bool CanReparentTo (albaVME *parent)
 
albaID GetMaxNodeId ()
 
albaID GetNextNodeId ()
 
void SetMaxNodeId (albaID id)
 
void ResetMaxNodeId ()
 
albaVMEStorageGetStorage () const
 
void SetStorage (albaVMEStorage *storage)
 
- Public Member Functions inherited from albaVME
 albaAbstractTypeMacro (albaVME, albaReferenceCounted)
 
virtual albaObjectNewObjectInstance () const
 
albaVMENewInstance ()
 
int Initialize ()
 
void Shutdown ()
 
int IsInitialized ()
 
int Store ()
 
int Restore ()
 
const char * GetName ()
 
virtual void SetName (const char *name)
 
virtual bool CanCopy (albaVME *vme)
 
albaVMEMakeCopy ()
 
albaVMECopyTree ()
 
albaVMEGetChild (albaID idx, bool onlyVisible=false)
 
albaVMEGetFirstChild (bool onlyVisible=false)
 
albaVMEGetLastChild (bool onlyVisible=false)
 
albaVMEGetByPath (const char *path, bool onlyVisible=true)
 
virtual int AddChild (albaVME *node)
 
virtual void RemoveChild (const albaID idx, bool onlyVisible=false)
 
virtual void RemoveChild (albaVME *node)
 
int FindNodeIdx (albaVME *a, bool onlyVisible=false)
 
int FindNodeIdx (const char *name, bool onlyVisible=false)
 
albaVMEFindInTreeByTag (const char *name, const char *value="", int type=ALBA_STRING_TAG)
 
albaVMEFindInTreeByName (const char *name, bool match_case=true, bool whole_word=true)
 
albaVMEFindInTreeById (const albaID id)
 
virtual int ReparentTo (albaVME *parent)
 
void Import (albaVME *tree)
 
bool IsAChild (albaVME *a)
 
bool IsInTree (albaVME *a)
 
albaVMEGetRoot ()
 
bool IsEmpty () const
 
bool IsOnVMETree ()
 
unsigned long GetNumberOfChildren () const
 
unsigned long GetNumberOfChildren (bool onlyVisible)
 
void CleanTree ()
 
void RemoveAllChildren ()
 
albaVMEIteratorNewIterator ()
 
void SetVisibleToTraverse (bool flag)
 
bool GetVisibleToTraverse ()
 
bool IsVisible ()
 
bool CompareTree (albaVME *vme)
 
virtual void UnRegister (void *o)
 
virtual void OnEvent (albaEventBase *e)
 
const albaChildrenVectorGetChildren ()
 
albaAttributesMapGetAttributes ()
 
void SetAttribute (const char *name, albaAttribute *a)
 
albaAttributeGetAttribute (const char *name)
 
void RemoveAttribute (const char *name)
 
void RemoveAllAttributes ()
 
albaTagArrayGetTagArray ()
 
albaVMEGetLink (const char *name)
 
void SetLink (const char *name, albaVME *node)
 
void SetMandatoryLink (const char *name, albaVME *node)
 
void SetLink (const char *name, albaVME *node, LinkType type)
 
void AddBackLink (const char *name, albaVME *node)
 
void RemoveBackLink (const char *name, albaVME *node)
 
void SetOldSubIdLink (albaString link_name, albaID link_node_id, albaID link_node_subid)
 
void RemoveLink (const char *name)
 
albaID GetNumberOfLinks ()
 
albaID GetNumberOfBackLinks ()
 
albaVMEBackLinks GetBackLinks ()
 
void RemoveAllLinks ()
 
void RemoveAllBackLinks ()
 
albaVMESet GetDependenciesVMEs ()
 
void RemoveDependenciesVMEs ()
 
bool WillBeRemovedWithDependencies (albaVME *vme)
 
albaLinksMapGetLinks ()
 
void ForwardUpEvent (albaEventBase *alba_event)
 
void ForwardUpEvent (albaEventBase &alba_event)
 
void ForwardDownEvent (albaEventBase *alba_event)
 
void ForwardDownEvent (albaEventBase &alba_event)
 
albaGUIGetGui ()
 
void DeleteGui ()
 
albaID GetId () const
 
void UpdateId ()
 
virtual unsigned long GetMTime ()
 
void DependsOnLinkedNodeOn ()
 
void DependsOnLinkedNodeOff ()
 
virtual void Print (std::ostream &os, const int tabs=0)
 
albaVMEGetParent () const
 
virtual int DeepCopy (albaVME *a)
 
virtual int ShallowCopy (albaVME *a)
 
virtual bool Equals (albaVME *vme)
 
virtual void SetTimeStamp (albaTimeStamp t)
 
virtual albaTimeStamp GetTimeStamp ()
 
void SetTreeTime (albaTimeStamp t)
 
virtual void SetMatrix (const albaMatrix &mat)=0
 
void SetPose (const albaMatrix &mat, albaTimeStamp t)
 
void SetPose (double x, double y, double z, double rx, double ry, double rz, albaTimeStamp t)
 
void SetPose (double xyz[3], double rxyz[3], albaTimeStamp t)
 
void ApplyMatrix (const albaMatrix &matrix, int premultiply, albaTimeStamp t=-1)
 
void SetAbsPose (double x, double y, double z, double rx, double ry, double rz, albaTimeStamp t=-1)
 
void SetAbsPose (double xyz[3], double rxyz[3], albaTimeStamp t=-1)
 
void SetAbsMatrix (const albaMatrix &matrix, albaTimeStamp t)
 
virtual void SetAbsMatrix (const albaMatrix &matrix)
 
void ApplyAbsMatrix (const albaMatrix &matrix, int premultiply, albaTimeStamp t=-1)
 
virtual bool CanReparentTo (albaVME *parent)
 
albaMatrixPipeGetMatrixPipe ()
 
albaAbsMatrixPipeGetAbsMatrixPipe ()
 
albaDataPipeGetDataPipe ()
 
virtual void Update ()
 
virtual void GetLocalTimeStamps (std::vector< albaTimeStamp > &kframes)=0
 
virtual void GetLocalTimeBounds (albaTimeStamp tbounds[2])
 
virtual void GetAbsTimeStamps (std::vector< albaTimeStamp > &kframes)
 
virtual void GetTimeStamps (std::vector< albaTimeStamp > &kframes)
 
int GetNumberOfTimeStamps ()
 
int GetNumberOfLocalTimeStamps ()
 
virtual bool IsAnimated ()
 
virtual bool IsDataAvailable ()
 
void SetCrypting (int crypting)
 
int GetCrypting ()
 
virtual albaVMEOutputGetOutput ()
 
virtual albaString GetVisualPipe ()
 
virtual albaString GetVisualPipeSlice ()
 
void SetVisualMode (int mode)
 
int GetVisualMode ()
 
albaInteractorGetBehavior ()
 
void SetBehavior (albaInteractor *bh)
 
void TestModeOn ()
 
void TestModeOff ()
 
bool GetTestMode ()
 
- Public Member Functions inherited from albaReferenceCounted
 albaReferenceCounted ()
 
virtual ~albaReferenceCounted ()
 
 albaAbstractTypeMacro (albaReferenceCounted, albaObject)
 
virtual void Delete ()
 
void Register (void *obj)
 
virtual void UnRegister (void *obj)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 
- Public Member Functions inherited from albaEventBroadcaster
 albaEventBroadcaster (void *owner=NULL)
 
virtual ~albaEventBroadcaster ()
 
 albaEventBroadcaster (const albaEventBroadcaster &c)
 
void AddObserver (albaObserver *obj)
 
void AddObserver (albaObserver &obj)
 
albaObserverCallbackAddObserverCallback (void(*f)(void *sender, albaID eid, void *clientdata, void *calldata))
 
bool RemoveObserver (albaObserver *obj)
 
void RemoveAllObservers ()
 
bool IsObserver (albaObserver *obj)
 
bool HasObservers ()
 
void GetObservers (std::vector< albaObserver * > &olist)
 
void InvokeEvent (albaEventBase &e)
 
void InvokeEvent (albaEventBase *e)
 
void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 
void SetChannel (albaID ch)
 
albaID GetChannel ()
 
virtual void SetListener (albaObserver *o)
 
- Public Member Functions inherited from albaEventSender
 albaEventSender ()
 
virtual void SetListener (albaObserver *o)
 
virtual albaObserverGetListener ()
 
virtual bool HasListener ()
 
virtual void InvokeEvent (albaEventBase &e)
 
virtual void InvokeEvent (albaEventBase *e)
 
virtual void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 
- Public Member Functions inherited from albaStorable
 albaStorable ()
 
int Store (albaStorageElement *element)
 
int Restore (albaStorageElement *element)
 
albaObjectCastToObject ()
 
bool IsStorable ()
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 
- Public Member Functions inherited from albaTimeStamped
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 

Static Public Member Functions

static char ** GetIcon ()
 
- Static Public Member Functions inherited from albaVME
static albaVMEMakeCopy (albaVME *a)
 
static albaVMECopyTree (albaVME *vme, albaVME *parent=NULL)
 
static char ** GetIcon ()
 
- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 
- Static Public Member Functions inherited from albaStorable
static albaStorableSafeCastToObject (albaObject *o)
 

Protected Member Functions

 albaVMERoot ()
 
virtual ~albaVMERoot ()
 
virtual albaGUICreateGui ()
 
virtual int StoreRoot (albaStorageElement *parent)
 
virtual int RestoreRoot (albaStorageElement *element)
 
virtual int InternalStore (albaStorageElement *parent)
 
virtual int InternalRestore (albaStorageElement *node)
 
- Protected Member Functions inherited from albaVME
 albaVME ()
 
virtual ~albaVME ()
 
void SetId (albaID id)
 
virtual int InternalStore (albaStorageElement *parent)
 
virtual int InternalRestore (albaStorageElement *node)
 
virtual void InternalShutdown ()
 
virtual int SetParent (albaVME *parent)
 
void OnNodeDetachedFromTree (albaEventBase *e)
 
void OnNodeAttachedToTree (albaEventBase *e)
 
void OnNodeDestroyed (albaEventBase *e)
 
void GetDependenciesVMEs (albaVMESet &dependencies, albaVME *vme)
 
virtual int InternalInitialize ()
 
virtual void InternalPreUpdate ()
 
virtual void InternalUpdate ()
 
virtual void InternalSetTimeStamp (albaTimeStamp t)
 
void SetOutput (albaVMEOutput *output)
 
virtual int SetDataPipe (albaDataPipe *dpipe)
 
int SetMatrixPipe (albaMatrixPipe *pipe)
 
albaString GetTypeNameFromType (albaString typeName)
 
void SetAbsMatrixPipe (albaAbsMatrixPipe *pipe)
 
virtual albaGUICreateGui ()
 
void NodeOnEvent (albaEventBase *e)
 
virtual int InternalStore (albaStorageElement *node)=0
 
virtual int InternalRestore (albaStorageElement *node)=0
 

Protected Attributes

albaID m_MaxItemId
 
albaTransformm_Transform
 
albaString m_ApplicationStamp
 
albaID m_MaxNodeId
 
albaVMEStoragem_Storage
 
- Protected Attributes inherited from albaVME
albaGUIm_Gui
 
albaChildrenVector m_Children
 
albaVMEm_Parent
 
albaAttributesMap m_Attributes
 
albaLinksMap m_Links
 
albaVMEBackLinks m_BackLinks
 
std::vector< albaOldSubIdLinkm_OldSubIdLinks
 
albaString m_Name
 
albaString m_GuiName
 
albaID m_Id
 
bool m_VisibleToTraverse
 
bool m_Initialized
 
bool m_DependsOnLinkedNode
 
bool m_TestMode
 
albaAutoPointer< albaDataPipem_DataPipe
 
albaAutoPointer< albaMatrixPipem_MatrixPipe
 
albaAutoPointer< albaAbsMatrixPipem_AbsMatrixPipe
 
albaVMEOutputm_Output
 
albaTimeStamp m_CurrentTime
 
int m_Crypting
 
albaInteractorm_Behavior
 
int m_VisualMode
 
- Protected Attributes inherited from albaReferenceCounted
int m_ReferenceCount
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 
- Protected Attributes inherited from albaEventBroadcaster
albaObserversList m_Observers
 
albaID m_Channel
 
- Protected Attributes inherited from albaEventSender
albaObserverm_Listener
 
- Protected Attributes inherited from albaStorable
bool m_Storable
 
- Protected Attributes inherited from albaTimeStamped
albaMTime m_MTime
 

Additional Inherited Members

- Protected Types inherited from albaEventBroadcaster
typedef std::list< albaObserver * > albaObserversList
 
- Static Protected Member Functions inherited from albaVME
static albaVMEInternalCopyTree (albaVME *vme, albaVME *parent)
 

Detailed Description

albaVMERoot - a VME is the root of a tree of VME nodes.

This node is a specialized VME acting as root of the tree. It inherits root behavior from albaRoot and also is responsible for generating Ids fore VME items added to the tree.

See also
albaVME

Definition at line 34 of file albaVMERoot.h.

Member Enumeration Documentation

◆ ROOT_GUI_ID

Enumerator
ID_APPLICATION_STAMP 
ID_LAST 

Definition at line 42 of file albaVMERoot.h.

Constructor & Destructor Documentation

◆ albaVMERoot()

albaVMERoot::albaVMERoot ( )
protected

allowed only dynamic allocation via New()

◆ ~albaVMERoot()

virtual albaVMERoot::~albaVMERoot ( )
protectedvirtual

Member Function Documentation

◆ albaTypeMacro()

albaVMERoot::albaTypeMacro ( albaVMERoot  ,
albaVME   
)

◆ Equals()

virtual bool albaVMERoot::Equals ( albaVME vme)
virtual

compare two VME-Root.

Reimplemented from albaVME.

◆ DeepCopy()

virtual int albaVMERoot::DeepCopy ( albaVME a)
virtual

Copy the contents of another VME into this one.

Notice that subtrees are not copied, i.e. copy is not recursive! Concrete class should reimplement this function to verify admitted conversion.

Reimplemented from albaVME.

◆ GetMaxItemId()

albaID albaVMERoot::GetMaxItemId ( )
inline

Return highest ItemId assigned for this tree.

Return -1 if no one has been assigned yet.

Definition at line 53 of file albaVMERoot.h.

◆ GetNextItemId()

albaID albaVMERoot::GetNextItemId ( )
inline

Return next available ItemId and increment the internal counter.

Definition at line 56 of file albaVMERoot.h.

References albaTimeStamped::Modified().

Here is the call graph for this function:

◆ SetMaxItemId()

void albaVMERoot::SetMaxItemId ( albaID  id)
inline

Set the ItemMaxId.

Beware when using this function to avoid non unique Ids.

Definition at line 61 of file albaVMERoot.h.

References albaTimeStamped::Modified().

Here is the call graph for this function:

◆ ResetMaxItemId()

void albaVMERoot::ResetMaxItemId ( )
inline

Definition at line 62 of file albaVMERoot.h.

◆ CleanTree()

void albaVMERoot::CleanTree ( )
inline

Clean the tree and all the data structures of this root.

Definition at line 65 of file albaVMERoot.h.

◆ SetMatrix()

virtual void albaVMERoot::SetMatrix ( const albaMatrix mat)
virtual

set the tree reference system

Implements albaVME.

◆ Print()

virtual void albaVMERoot::Print ( std::ostream &  os,
const int  tabs = 0 
)
virtual

print a dump of this object

Reimplemented from albaVME.

◆ GetLocalTimeStamps()

virtual void albaVMERoot::GetLocalTimeStamps ( std::vector< albaTimeStamp > &  kframes)
virtual

return no timestamps

Implements albaVME.

◆ OnEvent()

void albaVMERoot::OnEvent ( albaEventBase e)
virtual

Precess events coming from other objects.

Reimplemented from albaVME.

◆ Update()

virtual void albaVMERoot::Update ( )
virtual

Redefined to update the gui.

Reimplemented from albaVME.

◆ GetIcon()

static char ** albaVMERoot::GetIcon ( )
static

return an xpm-icon that can be used to represent this node

◆ GetVisualPipe()

virtual albaString albaVMERoot::GetVisualPipe ( )
inlinevirtual

Return the suggested pipe-typename for the visualization of this vme.

Reimplemented from albaVME.

Definition at line 88 of file albaVMERoot.h.

◆ CanReparentTo()

virtual bool albaVMERoot::CanReparentTo ( albaVME parent)
inlinevirtual

root node cannot be reparented.

Root nodes should redefine CanReparent to call this function.

Reimplemented from albaVME.

Definition at line 93 of file albaVMERoot.h.

◆ GetMaxNodeId()

albaID albaVMERoot::GetMaxNodeId ( )
inline

Return highest NodeId assigned for this tree.

Return -1 if no one has been assigned yet.

Definition at line 98 of file albaVMERoot.h.

◆ GetNextNodeId()

albaID albaVMERoot::GetNextNodeId ( )
inline

Return next available NodeId and increment the internal counter.

Definition at line 101 of file albaVMERoot.h.

◆ SetMaxNodeId()

void albaVMERoot::SetMaxNodeId ( albaID  id)
inline

Set the NodeMaxId.

Beware when using this function to avoid non unique Ids.

Definition at line 106 of file albaVMERoot.h.

◆ ResetMaxNodeId()

void albaVMERoot::ResetMaxNodeId ( )
inline

Definition at line 107 of file albaVMERoot.h.

◆ GetStorage()

albaVMEStorage * albaVMERoot::GetStorage ( ) const

Returns Storage.

◆ SetStorage()

void albaVMERoot::SetStorage ( albaVMEStorage storage)

Sets Storage.

◆ CreateGui()

virtual albaGUI * albaVMERoot::CreateGui ( )
protectedvirtual

Create GUI for the VME.

Reimplemented from albaVME.

◆ StoreRoot()

virtual int albaVMERoot::StoreRoot ( albaStorageElement parent)
protectedvirtual

◆ RestoreRoot()

virtual int albaVMERoot::RestoreRoot ( albaStorageElement element)
protectedvirtual

◆ InternalStore()

virtual int albaVMERoot::InternalStore ( albaStorageElement node)
protectedvirtual

This is called by Store() and must be reimplemented by subclasses.

The node element where the object should store itself is passed as argument.

Reimplemented from albaVME.

◆ InternalRestore()

virtual int albaVMERoot::InternalRestore ( albaStorageElement node)
protectedvirtual

This is called by Restore() and must be reimplemented by subclasses The element from which the object should restore itself is passed as argument.

Reimplemented from albaVME.

Member Data Documentation

◆ m_MaxItemId

albaID albaVMERoot::m_MaxItemId
protected

id counter for VME items

Definition at line 130 of file albaVMERoot.h.

◆ m_Transform

albaTransform* albaVMERoot::m_Transform
protected

pose matrix for the root

Definition at line 131 of file albaVMERoot.h.

◆ m_ApplicationStamp

albaString albaVMERoot::m_ApplicationStamp
protected

Definition at line 133 of file albaVMERoot.h.

◆ m_MaxNodeId

albaID albaVMERoot::m_MaxNodeId
protected

Counter for node Ids.

Definition at line 135 of file albaVMERoot.h.

◆ m_Storage

albaVMEStorage* albaVMERoot::m_Storage
protected

Definition at line 137 of file albaVMERoot.h.


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