KName
#include<kname.h>

List of all members.

Detailed Description

Name class.

Provides two stings, current and an initial name, for reversible renaming. This is especially useful for name clashing, renaming strategies and merging back to a former 3D scene using the initial names.

Definition at line54of filekname.h.


Public Member Functions

 KName(char const *pInitialName="")
 Constructor.
 KName(KNameconst&pName)
 Copy constructor.
 ~KName()
 Destructor.
void SetInitialName(char const *pInitialName)
 Set initial name.
char const * GetInitialName() const
 Get initial name.
void SetCurrentName(char const *pNewName)
 Set current name.
char const * GetCurrentName() const
 Get current name.
void SetNameSpace(char const *pNameSpace)
 Set the namespace.
char const * GetNameSpace() const
 Get the namespace.
bool IsRenamed() const
 Check if the current name and internal name match.
KNameoperator=(KNameconst&pName)
 Assignment operator.

Constructor&Destructor Documentation

KName(char const * pInitialName="" ) 

Constructor.

Parameters:
pInitialName Name string used to initialize both members (initialName and currentName) of this class.

KName(KNameconst& pName ) 

Copy constructor.

~KName( ) 

Destructor.

Member Function Documentation

void SetInitialName(char const * pInitialName ) 

Set initial name.

Parameters:
pInitialName New string for the initial name.
Remarks:
The current name will also be changed to this value.

char const* GetInitialName( ) const

Get initial name.

Returns:
Pointer to the InitialName string buffer.

void SetCurrentName(char const * pNewName ) 

Set current name.

Parameters:
pNewName New string for the current name.
Remarks:
The initial name is not affected.

char const* GetCurrentName( ) const

Get current name.

Returns:
Pointert to the CurrentName string buffer.

void SetNameSpace(char const * pNameSpace ) 

Set the namespace.

Parameters:
pNameSpace New string for the namespace.
Remarks:
The initial name is not affected.

char const* GetNameSpace( ) const

Get the namespace.

Returns:
Pointert to the CurrentName string buffer.

bool IsRenamed( ) const

Check if the current name and internal name match.

Returns:
trueif current name isn't identical to initial name.

KName&operator=(KNameconst& pName ) 

Assignment operator.