BlankMat 0.1.0
Free open-source 3D texture creation application
Loading...
Searching...
No Matches
INameable Class Reference

An object that keeps track of its name and scope. More...

Inheritance diagram for INameable:

Public Member Functions

virtual void Rename (const std::string &newName, bool includeScope=true)
 Renames the object, setting the scope to be the scoped part of the name.
 
virtual void SetName (const std::string &name)
 Sets the name of the object. Note: Does not set the scope variable. If renaming based on raw input, use Rename() instead to set the scope.
 
virtual void SetScope (const std::string &scope)
 Sets the scope of the object.
 
std::string GetUnscopedName ()
 Returns the unscoped name of the object.
 
std::string GetScope ()
 Returns the scope of the object.
 
std::string GetScopedName ()
 Returns the scoped name of the object.
 
void InitName (const std::string &name, const std::string &scope="")
 Initializes the nameable object with the given name and scope.
 
 INameable ()
 Creates a default nameable object without name or scope.
 

Protected Attributes

std::string mName = ""
 Name of the object.
 
std::string mScope = ""
 Scope of the object.
 

Detailed Description

An object that keeps track of its name and scope.

Constructor & Destructor Documentation

◆ INameable()

INameable::INameable ( )
inlineexplicit

Creates a default nameable object without name or scope.

Member Function Documentation

◆ GetScope()

std::string INameable::GetScope ( )
inline

Returns the scope of the object.

Returns
Scope of the object

◆ GetScopedName()

std::string INameable::GetScopedName ( )
inline

Returns the scoped name of the object.

Returns
Scoped name of the object

◆ GetUnscopedName()

std::string INameable::GetUnscopedName ( )
inline

Returns the unscoped name of the object.

Returns
Name of the object

◆ InitName()

void INameable::InitName ( const std::string &  name,
const std::string &  scope = "" 
)
inline

Initializes the nameable object with the given name and scope.

Parameters
nameName of the object
scopeScope of the object (if any)

◆ Rename()

virtual void INameable::Rename ( const std::string &  newName,
bool  includeScope = true 
)
inlinevirtual

Renames the object, setting the scope to be the scoped part of the name.

Parameters
newNameNew name to rename to
includeScopeWhether to incldude scope as part of the renaming

◆ SetName()

virtual void INameable::SetName ( const std::string &  name)
inlinevirtual

Sets the name of the object. Note: Does not set the scope variable. If renaming based on raw input, use Rename() instead to set the scope.

Parameters
nameRaw name of the object

Reimplemented in Scene.

◆ SetScope()

virtual void INameable::SetScope ( const std::string &  scope)
inlinevirtual

Sets the scope of the object.

Parameters
scopeScope to set the object to

Member Data Documentation

◆ mName

std::string INameable::mName = ""
protected

Name of the object.

◆ mScope

std::string INameable::mScope = ""
protected

Scope of the object.