Public Member Functions

Command Class Reference

Command interface. More...

#include <keyvalue/mngt/Command.h>

List of all members.

Public Member Functions

virtual const char * getName () const =0
 Gets Processor's name.
virtual const char * getCommandName () const =0
 Gets Command's name.

Detailed Description

Command interface.

A Processor able to process an empty DataSet might be a Command.

For instance, if the Processor is Builder<OutputType>, for some ObjectType, then Builder<OutputType>::getObject(const DataSet& data) might do its job ignoring data. Another way is when the method does look up values in an empty data but, failing to find any, can still do its job considering default values for the searched keys (with or without intervention of DataSet Default).

In either cases above, the Builder<OutputType> might be declared as a command by publicly deriving from this class. Similar arguments hold for a Calculator<Tag>. The public derivation can be done directly but the use of DeclareBuilder.h or DeclareCalculator.h are preferable. (See Builder and Calculator for details.)

When a Processor is a Command some front-ends might take advantage of this fact and provide to their users some shortcut or menu entry to call the Processor without asking for additional user's input.


Member Function Documentation

virtual const char* getName (  )  const [pure virtual]

Gets Processor's name.

Returns:
The name.
virtual const char* getCommandName (  )  const [pure virtual]

Gets Command's name.

Returns:
The name.