anatomist 6.0.4
3D neuroimaging data viewer
anatomist::DuplicateObjectCommand Class Reference

Duplicate (clone or shallow-copy) an object when possible. More...

#include <anatomist/commands/cDuplicateObject.h>

Inheritance diagram for anatomist::DuplicateObjectCommand:
Collaboration diagram for anatomist::DuplicateObjectCommand:

Public Member Functions

 DuplicateObjectCommand (AObject *source, bool shallow=true, int id=-1, const std::string &objname="", bool hidden=false, CommandContext *context=&CommandContext::defaultContext())
 
virtual ~DuplicateObjectCommand ()
 
virtual std::string name () const
 Return the unique name of a class of commands.
 
virtual void write (Tree &com, Serializer *ser) const
 Print the guts of a command into a Tree given as parent.
 
AObjectobject ()
 
- Public Member Functions inherited from anatomist::RegularCommand
virtual ~RegularCommand ()
 Destructor does nothing.
 
- Public Member Functions inherited from anatomist::Command
virtual ~Command ()
 Destructor does nothing.
 
virtual void execute ()
 Execute the command - may use {\tt doit()}.
 
virtual void undo ()
 Undo the command - may use {\tt undoit()}.
 
virtual void redo ()
 Redo the command - may use {\tt doit()}.
 

Protected Member Functions

virtual void doit ()
 Do a command.
 
- Protected Member Functions inherited from anatomist::RegularCommand
 RegularCommand ()
 The programmer cannot call the constructor of an abstract base class.
 
- Protected Member Functions inherited from anatomist::Command
 Command ()
 The programmer cannot call the constructor of an abstract base class.
 
virtual void undoit ()
 Undo a command.
 

Friends

class StdModule
 

Additional Inherited Members

- Public Types inherited from anatomist::Command
typedef Command *(* Reader) (const Tree &, CommandContext *)
 

Detailed Description

Duplicate (clone or shallow-copy) an object when possible.

Definition at line 54 of file cDuplicateObject.h.

Constructor & Destructor Documentation

◆ DuplicateObjectCommand()

anatomist::DuplicateObjectCommand::DuplicateObjectCommand ( AObject * source,
bool shallow = true,
int id = -1,
const std::string & objname = "",
bool hidden = false,
CommandContext * context = &CommandContext::defaultContext() )

◆ ~DuplicateObjectCommand()

virtual anatomist::DuplicateObjectCommand::~DuplicateObjectCommand ( )
virtual

Member Function Documentation

◆ doit()

virtual void anatomist::DuplicateObjectCommand::doit ( )
protectedvirtual

Do a command.

Implements anatomist::Command.

◆ name()

virtual std::string anatomist::DuplicateObjectCommand::name ( ) const
inlinevirtual

Return the unique name of a class of commands.

Implements anatomist::Command.

Definition at line 64 of file cDuplicateObject.h.

◆ object()

AObject * anatomist::DuplicateObjectCommand::object ( )
inline

Definition at line 66 of file cDuplicateObject.h.

◆ write()

virtual void anatomist::DuplicateObjectCommand::write ( Tree & com,
Serializer * ser ) const
virtual

Print the guts of a command into a Tree given as parent.

Reimplemented from anatomist::Command.

Friends And Related Symbol Documentation

◆ StdModule

friend class StdModule
friend

Definition at line 72 of file cDuplicateObject.h.

References anatomist::SerializingCommand::context(), and StdModule.

Referenced by StdModule.


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