Command Class Reference

used directly More...

List of all members.

Public Member Functions

virtual std::auto_ptr< Commandclone () const
 Virtual copy constructor.
 Command (const SmartUtil::tstring &name)
 constructor
const SmartUtil::tstring & Name () const
 Returns the "friendly" name of the Command.
virtual ~Command ()
 Virtual DTOR since we often will destroy object from a pointer to a base class.

Protected Member Functions

 Command ()
 Constructor taking nothing.


Detailed Description

used directly

Can if nothing else then a unique name is needed be instantiated directly...
Used e.g. in createTimer...


Constructor & Destructor Documentation

Command ( const SmartUtil::tstring &  name  )  [explicit]

constructor

Constructor taking a SmartUtil::tstring which then can be used for identifying the Command to make sure you have the "right" command object.

virtual ~Command (  )  [virtual]

Virtual DTOR since we often will destroy object from a pointer to a base class.

This assures you can destroy the Command from a base class pointer (normally a Command will be instantiated from a derived class but often destroyed from the base class Command)

Command (  )  [protected]

Constructor taking nothing.

DON'T use this Constructor unless you derive from the class.
Sets the "name" of the Command to "Undefined".


Member Function Documentation

virtual std::auto_ptr< Command > clone (  )  const [virtual]

Virtual copy constructor.

If you derive from this class you MUST override this function to return an instance of your
own custom Command object.
Otherwise you WILL experience "slicing" of your Command object

const SmartUtil::tstring& Name (  )  const

Returns the "friendly" name of the Command.

This is the name that was supplied when constructing your Command (if you used the Constructor taking a string)

Back to SmartWin website
SourceForge.net Logo