DNA Calib 1.1
Project brief
Classes | Public Member Functions | Private Attributes | List of all members
dnac::RenameMeshCommand Class Reference

RenameMeshCommand is used to rename a mesh. More...

#include <RenameMeshCommand.h>

Inheritance diagram for dnac::RenameMeshCommand:
Inheritance graph
Collaboration diagram for dnac::RenameMeshCommand:
Collaboration graph

Classes

class  Impl
 

Public Member Functions

DNACAPI RenameMeshCommand (MemoryResource *memRes=nullptr)
 
DNACAPI RenameMeshCommand (std::uint16_t meshIndex, const char *newName, MemoryResource *memRes=nullptr)
 
DNACAPI RenameMeshCommand (const char *oldName, const char *newName, MemoryResource *memRes=nullptr)
 
DNACAPI ~RenameMeshCommand ()
 
 RenameMeshCommand (const RenameMeshCommand &)=delete
 
RenameMeshCommandoperator= (const RenameMeshCommand &)=delete
 
DNACAPI RenameMeshCommand (RenameMeshCommand &&)
 
DNACAPI RenameMeshCommandoperator= (RenameMeshCommand &&)
 
DNACAPI void setName (std::uint16_t meshIndex, const char *newName)
 Method for setting a new name for mesh with given index. More...
 
DNACAPI void setName (const char *oldName, const char *newName)
 Method for setting a new name for mesh with given name. More...
 
DNACAPI void run (DNACalibDNAReader *output) override
 
- Public Member Functions inherited from dnac::Command
virtual ~Command ()
 
virtual void run (DNACalibDNAReader *output)=0
 

Private Attributes

ScopedPtr< ImplpImpl
 

Detailed Description

RenameMeshCommand is used to rename a mesh.

Constructor & Destructor Documentation

◆ RenameMeshCommand() [1/5]

dnac::RenameMeshCommand::RenameMeshCommand ( MemoryResource memRes = nullptr)
explicit
43 : pImpl{makeScoped<Impl>(memRes)} {
44}
ScopedPtr< Impl > pImpl
Definition: RenameMeshCommand.h:55

◆ RenameMeshCommand() [2/5]

dnac::RenameMeshCommand::RenameMeshCommand ( std::uint16_t  meshIndex,
const char *  newName,
MemoryResource memRes = nullptr 
)
46 :
47 pImpl{makeScoped<Impl>(memRes)} {
48
49 pImpl->setName(meshIndex, newName);
50}

References pImpl.

◆ RenameMeshCommand() [3/5]

dnac::RenameMeshCommand::RenameMeshCommand ( const char *  oldName,
const char *  newName,
MemoryResource memRes = nullptr 
)
52 :
53 pImpl{makeScoped<Impl>(memRes)} {
54
55 pImpl->setName(oldName, newName);
56}

References pImpl.

◆ ~RenameMeshCommand()

dnac::RenameMeshCommand::~RenameMeshCommand ( )
default

◆ RenameMeshCommand() [4/5]

dnac::RenameMeshCommand::RenameMeshCommand ( const RenameMeshCommand )
delete

◆ RenameMeshCommand() [5/5]

dnac::RenameMeshCommand::RenameMeshCommand ( RenameMeshCommand &&  )
default

Member Function Documentation

◆ operator=() [1/2]

RenameMeshCommand & dnac::RenameMeshCommand::operator= ( const RenameMeshCommand )
delete

◆ operator=() [2/2]

RenameMeshCommand & dnac::RenameMeshCommand::operator= ( RenameMeshCommand &&  )
default

◆ run()

void dnac::RenameMeshCommand::run ( DNACalibDNAReader output)
overridevirtual

Implements dnac::Command.

70 {
71 pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output));
72}

References pImpl.

◆ setName() [1/2]

void dnac::RenameMeshCommand::setName ( const char *  oldName,
const char *  newName 
)

Method for setting a new name for mesh with given name.

Note
The renaming will not happen if there is no mesh with given current name.
Parameters
oldNameThe current name of the mesh whose name to change.
newNameThe new name for the mesh.
66 {
67 pImpl->setName(oldName, newName);
68}

References pImpl.

◆ setName() [2/2]

void dnac::RenameMeshCommand::setName ( std::uint16_t  meshIndex,
const char *  newName 
)

Method for setting a new name for mesh with given index.

Parameters
meshIndexThe index of the mesh whose name to change.
newNameThe new name for the mesh.
62 {
63 pImpl->setName(meshIndex, newName);
64}

References pImpl.

Member Data Documentation

◆ pImpl

ScopedPtr<Impl> dnac::RenameMeshCommand::pImpl
private

Referenced by RenameMeshCommand(), run(), and setName().


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