All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VisualizationBase Class CATRepPath

CATRepPath
 

Usage: you must use this class as is. You should never derive it.


public class CATRepPath

Class representing a single graphical representation within a graphical tree.

Role : use to identify or to draw a single graphical
representation of the graphic tree or part of one.

This class uses an internal index to add, remove or give
graphic representation. Be carreful, when using methods
that modify this index especially if one instance of CATRepPath
could be use at the same time at differents places.
Preferes to use methods that doesn't use this index :

  1. Size
  2. operator[]


Constructor and Destructor Index


o CATRepPath(CATRepPath&)
Copy constructor.
o CATRepPath(CATViewpoint*)
Default constructor.
o ~CATRepPath()

Method Index


o AddRef()
Increments the reference count for the given object.
o AddRep(CATRep&,int)
Adds a rep in the path.
o Contains(CATRepPath&)
Checks if an other repPath is inclued in this.
o Empty()
Empties the path.
o GetCurrentRep()
Gets the graphic representation at the internal cursor position.
o GetCursorPosition()
Returns the internal cursor position.
o GetCursorPosition()
Returns the internal cursor position.
o GetInteractiveContext()
Gets the interactive context.
o GetSubElementList()
Gets the actual list of sub-element for this repPath.
o GetViewpoint()
Gets the viewpoint in wich the repPath will be drawn.
o HasSubElement()
Indicates if the repPath has sub-elements.
o InitToTopRep()
Inits to the top rep.
o IsValid(void)
Enables to know if a CATRepPath is still valid or not.
o NextChildRep()
Gets the next rep.
o Release()
Decrements the reference count for the given object.
o RemoveRep(CATRep&)
Removes a rep from the path.
o SetInteractiveContext(CATInteractiveContext)
Defines the interactive context.
o SetSubElementList(list<int>&)
Sets a list of sub-element for this repPath.
o SetViewpoint(CATViewpoint*)
Sets the viewpoint in wich the repPath will be drawn.
o Size()
Gives the size of the path.
o operator =(CATRepPath&)
Operator of assignment.
o operator[](int)
Gives a particular rep from the path.

Constructor and Destructor


o CATRepPath
public CATRepPath( const CATRepPath& iPath)
Copy constructor.
Parameters:
iPath
The repPath to copy.
o CATRepPath
public CATRepPath(CATViewpoint* iViewpointWherePathIsDrawn= NULL)
Default constructor.
Parameters:
iViewpointWherePathIsDrawn
The viewpoint in wich the graphic representation will be drawn.
o ~CATRepPath
public virtual ~CATRepPath()

Methods


o AddRef
public int AddRef()
Increments the reference count for the given object.
Returns:
The reference count value.
This information is meant to be used for diagnostic/testing purposes only, because, in certain situations, the value may be unstable.
o AddRep
public void AddRep(CATRep& iRep,
int fastAdd= 0)
Adds a rep in the path.
Role : uses to build the path, this method
must be called as many times as the depth of the path.
Parameters:
iRep
The rep to add.
o Contains
public int Contains( const CATRepPath& iOtherRepPath)
Checks if an other repPath is inclued in this.
Parameters:
iOtherRepPath
The repPath we look for into this.
Returns:
The result of the check.
o Empty
public void Empty()
Empties the path.
Role : removes all reps from the path.
o GetCurrentRep
public CATRep* GetCurrentRep()
Gets the graphic representation at the internal cursor position.
Returns:
The rep at the internal cursor position.
o GetCursorPosition
public int GetCursorPosition()const
Returns the internal cursor position.
Returns:
The internal cursor value as a const.
InitToTopRep and NextChildRep
o GetCursorPosition
public int GetCursorPosition()
Returns the internal cursor position.
Returns:
The internal cursor value.
This cursor could be modified by methods
InitToTopRep and NextChildRep
o GetInteractiveContext
public CATInteractiveContext GetInteractiveContext()const
Gets the interactive context.
Role : gives the interactive context that
will be use to draw the graphic representation.
Returns:
The CATInteractiveContext of the context.
o GetSubElementList
public const list& GetSubElementList()const
Gets the actual list of sub-element for this repPath.
Returns:
The list of sub-elements : a list of index that
indicates singles parts of the leaf graphic
representation in the repPath.
o GetViewpoint
public CATViewpoint* GetViewpoint()const
Gets the viewpoint in wich the repPath will be drawn.
Returns:
The viewpoint in which graphic representation will be drawn.
o HasSubElement
public int HasSubElement()const
Indicates if the repPath has sub-elements.
Returns:
The number of sub-elements, returns 0 if no sub-element.
o InitToTopRep
public virtual void InitToTopRep()
Inits to the top rep.
Role : its the internal index before the first graphic
representation in the path.
Call NextChildRep to get the first rep.
o IsValid
public int IsValid(void )
Enables to know if a CATRepPath is still valid or not.
Returns:
An int
1
All the CATRep referenced by the CATRepPath are still alive. The path can be used as is.
0
At least one of the referenced CATRep was destroyed. Therefore, the CATRepPath is not valid anymore.
o NextChildRep
public CATRep * NextChildRep()
Gets the next rep.
Role : increment the internal cursor then gets
the graphic representation at the cursor position.
Returns:
The next graphic representation of the path.
o Release
public int Release()
Decrements the reference count for the given object.
Returns:
The reference count value.
This information is meant to be used for diagnostic/testing purposes only, because, in certain situations, the value may be unstable.
o RemoveRep
public void RemoveRep(CATRep& iRep)
Removes a rep from the path.
Role : removes a particular rep from the path.
Parameters:
iRep
The rep to remove.
o SetInteractiveContext
public void SetInteractiveContext(CATInteractiveContext iContext)
Defines the interactive context.
Role : precise if the graphic representation
must be drawn taking account the context defined in parameter.
Parameters:
iContext
The context defines by
CATInteractiveContext enum.
o SetSubElementList
public void SetSubElementList( const list<int>& iSubElementList)
Sets a list of sub-element for this repPath.
Role : A sub element is a value that represent
a single part of a graphic representation.
Seting a sub-element allow precise which sub-part
of the leaf graphic representation you want to describe
in the repPath.
Parameters:
iSubElementList
The sub-element list : a list of index.
o SetViewpoint
public void SetViewpoint(CATViewpoint* iViewpoint)
Sets the viewpoint in wich the repPath will be drawn.
Parameters:
iViewpoint
The viewpoint in which graphic representation will be drawn.
o Size
public int Size()const
Gives the size of the path.
Role : returns the number of graphic
representation in the path. You can use this
method to go through the path from 0 to Size-1,
using operator[].
Returns:
The size of the path.
o operator =
public CATRepPath& operator =( const CATRepPath& iPath)
Operator of assignment.
Parameters:
iPath
The repPath use to create a new one identical.
Returns:
The new repPath created by assignment.
o operator[]
public CATRep* operator[](int iIndex) const
Gives a particular rep from the path.
Role : return the rep at the
position given by the index in parameter.
Parameters:
iIndex
The index of the position.
Legal values : value of the index must
be betwween 0 and
Size -1.
Returns:
The rep at the iIndex position.

This object is included in the file: CATRepPath.h
If needed, your Imakefile.mk should include the module: CATViz

Copyright © 2003, Dassault Systèmes. All rights reserved.