# ApplicationFramework
TKLCAF
TNaming

# TNaming Class Reference

A topological attribute can be seen as a hook
into the topological structure. To this hook,
data can be attached and references defined.
It is used for keeping and access to
topological objects and their evolution. All
topological objects are stored in the one
user-protected TNaming_UsedShapes
attribute at the root label of the data
framework. This attribute contains map with all
topological shapes, used in this document.
To all other labels TNaming_NamedShape
attribute can be added. This attribute contains
references (hooks) to shapes from the
TNaming_UsedShapes attribute and evolution
of these shapes. TNaming_NamedShape
attribute contains a set of pairs of hooks: old
shape and new shape (see the figure below).
It allows not only get the topological shapes by
the labels, but also trace evolution of the
shapes and correctly resolve dependent
shapes by the changed one.
If shape is just-created, then the old shape for
accorded named shape is an empty shape. If
a shape is deleted, then the new shape in this named shape is empty.
Different algorithms may dispose sub-shapes
of the result shape at the individual label depending on necessity:
· If a sub-shape must have some extra attributes (material of
each face or color of each edge). In this case a specific sub-shape is
placed to the separate label (usually, sub-label of the result shape label)
with all attributes of this sub-shape.
· If topological naming is needed, a necessary and sufficient
(for selected sub-shapes identification) set of sub-shapes is
placed to the child labels of the result
shape label. As usual, as far as basic solids and closed shells are
concerned, all faces of the shape are disposed. Edges and vertices
sub-shapes can be identified as intersection of contiguous faces.
Modified/generated shapes may be placed to one named shape and
identified as this named shape and source named shape that also can be
identified with used algorithms.
TNaming_NamedShape may contain a few
pairs of hooks with the same evolution. In this
case topology shape, which belongs to the
named shape, is a compound of new shapes.
The data model contains both the topology
and the hooks, and functions handle both
topological entities and hooks. Consider the
case of a box function, which creates a solid
with six faces and six hooks. Each hook is
attached to a face. If you want, you can also
have this function create hooks for edges and
vertices as well as for faces. For the sake of
simplicity though, let's limit the example.
Not all functions can define explicit hooks for
all topological entities they create, but all
topological entities can be turned into hooks
when necessary. This is where topological naming is necessary.
.

`#include <TNaming.hxx>`

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)

## Static Public Member Functions

static Standard_EXPORT void | Substitute (const TDF_Label &labelsource, const TDF_Label &labelcible, TopTools_DataMapOfShapeShape &mapOldNew)
| Subtituter les shapes sur les structures de source vers cible .
static Standard_EXPORT void | Update (const TDF_Label &label, TopTools_DataMapOfShapeShape &mapOldNew)
| Mise a jour des shapes du label et de ses fils en tenant compte des substitutions decrite par mapOldNew. Warning: le remplacement du shape est fait dans tous les attributs qui le contiennent meme si ceux ci ne sont pas associees a des sous-labels de <label>. .
static Standard_EXPORT void | Displace (const TDF_Label &label, const TopLoc_Location &aLocation, const Standard_Boolean WithOld=Standard_True)
| Application de la Location sur les shapes du label et de ses sous labels. .
static Standard_EXPORT void | ChangeShapes (const TDF_Label &label, TopTools_DataMapOfShapeShape &M)
| Remplace les shapes du label et des sous-labels par des copies. .
static Standard_EXPORT void | Transform (const TDF_Label &label, const gp_Trsf &aTransformation)
| Application de la transformation sur les shapes du label et de ses sous labels. Warning: le remplacement du shape est fait dans tous les attributs qui le contiennent meme si ceux ci ne sont pas associees a des sous-labels de <label>. .
static Standard_EXPORT void | Replicate (const Handle(TNaming_NamedShape)&NS, const gp_Trsf &T, const TDF_Label &L)
| Replicates the named shape with the transformation <t> on the label <l> (and sub-labels if necessary) (TNaming_GENERATED is set) .
static Standard_EXPORT void | Replicate (const TopoDS_Shape &SH, const gp_Trsf &T, const TDF_Label &L)
| Replicates the shape with the transformation <t> on the label <l> (and sub-labels if necessary) (TNaming_GENERATED is set) //! Print of TNaming enumeration ============================= .
static Standard_EXPORT void | IDList (TDF_IDList &anIDList)
| Appends to <anidlist> the list of the attributes IDs of this package. CAUTION: <anidlist> is NOT cleared before use. .
static Standard_EXPORT Standard_OStream & | Print (const TNaming_Evolution EVOL, Standard_OStream &S)
static Standard_EXPORT Standard_OStream & | Print (const TNaming_NameType NAME, Standard_OStream &S)
static Standard_EXPORT Standard_OStream & | Print (const TDF_Label &ACCESS, Standard_OStream &S)

## Member Function Documentation

static Standard_EXPORT void TNaming::ChangeShapes | ( | const TDF_Label & | label,
|  | TopTools_DataMapOfShapeShape & | M
| ) | `[static]`

static Standard_EXPORT void TNaming::Displace | ( | const TDF_Label & | label,
|  | const TopLoc_Location & | aLocation,
|  | const Standard_Boolean | WithOld = `Standard_True`
| ) | `[static]`

static Standard_EXPORT void TNaming::IDList | ( | TDF_IDList & | anIDList | ) | `[static]`

void TNaming::operator delete | ( | void * | anAddress | ) | `[inline]`

void* TNaming::operator new | ( | size_t | size | ) | `[inline]`

void* TNaming::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

static Standard_EXPORT Standard_OStream& TNaming::Print | ( | const TDF_Label & | ACCESS,
|  | Standard_OStream & | S
| ) | `[static]`

static Standard_EXPORT Standard_OStream& TNaming::Print | ( | const TNaming_NameType | NAME,
|  | Standard_OStream & | S
| ) | `[static]`

static Standard_EXPORT Standard_OStream& TNaming::Print | ( | const TNaming_Evolution | EVOL,
|  | Standard_OStream & | S
| ) | `[static]`

static Standard_EXPORT void TNaming::Replicate | ( | const TopoDS_Shape & | SH,
|  | const gp_Trsf & | T,
|  | const TDF_Label & | L
| ) | `[static]`

static Standard_EXPORT void TNaming::Replicate | ( | const Handle(TNaming_NamedShape)& | NS,
|  | const gp_Trsf & | T,
|  | const TDF_Label & | L
| ) | `[static]`

static Standard_EXPORT void TNaming::Substitute | ( | const TDF_Label & | labelsource,
|  | const TDF_Label & | labelcible,
|  | TopTools_DataMapOfShapeShape & | mapOldNew
| ) | `[static]`

static Standard_EXPORT void TNaming::Transform | ( | const TDF_Label & | label,
|  | const gp_Trsf & | aTransformation
| ) | `[static]`

static Standard_EXPORT void TNaming::Update | ( | const TDF_Label & | label,
|  | TopTools_DataMapOfShapeShape & | mapOldNew
| ) | `[static]`

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

- TNaming.hxx