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

RenameJointCommand is used to rename a joint. More...

#include <RenameJointCommand.h>

Inheritance diagram for dnac::RenameJointCommand:
Inheritance graph
Collaboration diagram for dnac::RenameJointCommand:
Collaboration graph

Classes

class  Impl
 

Public Member Functions

DNACAPI RenameJointCommand (MemoryResource *memRes=nullptr)
 
DNACAPI RenameJointCommand (std::uint16_t jointIndex, const char *newName, MemoryResource *memRes=nullptr)
 
DNACAPI RenameJointCommand (const char *oldName, const char *newName, MemoryResource *memRes=nullptr)
 
DNACAPI ~RenameJointCommand ()
 
 RenameJointCommand (const RenameJointCommand &)=delete
 
RenameJointCommandoperator= (const RenameJointCommand &)=delete
 
DNACAPI RenameJointCommand (RenameJointCommand &&)
 
DNACAPI RenameJointCommandoperator= (RenameJointCommand &&)
 
DNACAPI void setName (std::uint16_t jointIndex, const char *newName)
 Method for setting a new name for joint with given index. More...
 
DNACAPI void setName (const char *oldName, const char *newName)
 Method for setting a new name for joint 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

RenameJointCommand is used to rename a joint.

Constructor & Destructor Documentation

◆ RenameJointCommand() [1/5]

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

◆ RenameJointCommand() [2/5]

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

References pImpl.

◆ RenameJointCommand() [3/5]

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

References pImpl.

◆ ~RenameJointCommand()

dnac::RenameJointCommand::~RenameJointCommand ( )
default

◆ RenameJointCommand() [4/5]

dnac::RenameJointCommand::RenameJointCommand ( const RenameJointCommand )
delete

◆ RenameJointCommand() [5/5]

dnac::RenameJointCommand::RenameJointCommand ( RenameJointCommand &&  )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ run()

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

Implements dnac::Command.

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

References pImpl.

◆ setName() [1/2]

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

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

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

References pImpl.

◆ setName() [2/2]

void dnac::RenameJointCommand::setName ( std::uint16_t  jointIndex,
const char *  newName 
)

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

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

References pImpl.

Referenced by main().

Member Data Documentation

◆ pImpl

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

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


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