MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
MAKLogger::DtRuntimeCommandFactory Class Reference

The factory for decoding text commands. More...

+ Collaboration diagram for MAKLogger::DtRuntimeCommandFactory:

Public Member Functions

 DtRuntimeCommandFactory ()
 Command serialization functions. More...
 
virtual ~DtRuntimeCommandFactory ()
 
virtual void commandNames (DtCollector< DtString > names)
 Get the command names that can be called via it's name. More...
 
virtual void commandParams (DtLgrCommandType, DtLgrCommandId, DtParameterList &outParams)
 Get the parameters. More...
 
virtual DtString * commandName (DtLgrCommandType, DtLgrCommandId)
 Get the command name, or NULL if not found. More...
 
DtLgrCommandType commandType (const DtString &name)
 Get the command type or 0 if not found;. More...
 
virtual DtLgrCommandId commandId (const DtString &)
 Get the command id or 0 if not found. More...
 
virtual DtCommand generateCommand (DtLgrCommandType type, DtLgrCommandId id, const DtParameterList &nameValuePairs)
 Attempts to generate a command based on the id, and a list of parameter name/value pairs, where the DtTypeNameParameters in the list are keyed by name. More...
 
DtAnyValuedeserializeParameter (const DtString &type, const DtString &value) const
 
DtAnyValuedeserializeParameterList (const DtString &type, const std::vector< DtString > &values) const
 
void registerCommand (const DtCommandDefinition &)
 Method for registering commands. More...
 
void unregisterCommand (const DtCommandDefinition &)
 Method for unregistering commands. More...
 

Static Public Member Functions

static bool isListType (const DtString &)
 Get whether the type is a list. More...
 
static DtString listItemType (const DtString listType)
 Get the list item type from the listType. More...
 
static DtString baseType (const DtString typeAlias)
 Get the base type from various alias types. More...
 
static DtString stringType ()
 
static DtString intType ()
 
static DtString int64Type ()
 
static DtString floatType ()
 
static DtString doubleType ()
 
static DtString boolType ()
 
static DtString timeType ()
 
static DtString relativeTimeType ()
 
static DtString stringListType ()
 
static DtString voidPtrType ()
 
static DtString base64Type ()
 

Protected Types

typedef std::map
< DtLgrCommandUniqueId,
DtParameterList
DtCommandParamMap
 
typedef std::map
< DtLgrCommandUniqueId,
DtString > 
DtCommandIdMap
 
typedef std::map< DtString,
DtLgrCommandUniqueId
DtCommandNameMap
 

Protected Member Functions

virtual bool isStringType (const DtString &type) const
 
virtual bool isIntType (const DtString &type) const
 
virtual bool isInt64Type (const DtString &type) const
 
virtual bool isFloatType (const DtString &type) const
 
virtual bool isDoubleType (const DtString &type) const
 
virtual bool isBoolType (const DtString &type) const
 
virtual bool isTimeType (const DtString &type) const
 
virtual bool isRelativeTimeType (const DtString &type) const
 
virtual bool isStringListType (const DtString &type) const
 
virtual bool isVoidPtrType (const DtString &type) const
 
virtual bool isBase64Type (const DtString &type) const
 

Protected Attributes

DtCommandNameMap myCommandNameMap
 A map of command names to ids. More...
 
DtCommandIdMap myCommandIdMap
 A map of command ids to names. More...
 
DtCommandParamMap myCommandParamMap
 A map of command ids to a list of parameters. More...
 

Detailed Description

The factory for decoding text commands.

Member Typedef Documentation

Constructor & Destructor Documentation

MAKLogger::DtRuntimeCommandFactory::DtRuntimeCommandFactory ( )

Command serialization functions.

Some commands can be creating using strings suitable for embedding in a configuration file.

virtual MAKLogger::DtRuntimeCommandFactory::~DtRuntimeCommandFactory ( )
virtual

Member Function Documentation

static DtString MAKLogger::DtRuntimeCommandFactory::base64Type ( )
static
static DtString MAKLogger::DtRuntimeCommandFactory::baseType ( const DtString  typeAlias)
static

Get the base type from various alias types.

Numerous types can have alias which can serialize/deserialze to basic types. For example DtString and std::string are both string types.

static DtString MAKLogger::DtRuntimeCommandFactory::boolType ( )
static
virtual DtLgrCommandId MAKLogger::DtRuntimeCommandFactory::commandId ( const DtString &  )
virtual

Get the command id or 0 if not found.

virtual DtString* MAKLogger::DtRuntimeCommandFactory::commandName ( DtLgrCommandType  ,
DtLgrCommandId   
)
virtual

Get the command name, or NULL if not found.

virtual void MAKLogger::DtRuntimeCommandFactory::commandNames ( DtCollector< DtString >  names)
virtual

Get the command names that can be called via it's name.

virtual void MAKLogger::DtRuntimeCommandFactory::commandParams ( DtLgrCommandType  ,
DtLgrCommandId  ,
DtParameterList outParams 
)
virtual

Get the parameters.

DtLgrCommandType MAKLogger::DtRuntimeCommandFactory::commandType ( const DtString &  name)

Get the command type or 0 if not found;.

DtAnyValue* MAKLogger::DtRuntimeCommandFactory::deserializeParameter ( const DtString &  type,
const DtString &  value 
) const
DtAnyValue* MAKLogger::DtRuntimeCommandFactory::deserializeParameterList ( const DtString &  type,
const std::vector< DtString > &  values 
) const
static DtString MAKLogger::DtRuntimeCommandFactory::doubleType ( )
static
static DtString MAKLogger::DtRuntimeCommandFactory::floatType ( )
static
virtual DtCommand MAKLogger::DtRuntimeCommandFactory::generateCommand ( DtLgrCommandType  type,
DtLgrCommandId  id,
const DtParameterList nameValuePairs 
)
virtual

Attempts to generate a command based on the id, and a list of parameter name/value pairs, where the DtTypeNameParameters in the list are keyed by name.

Example: DtParameterList params; param.push_back(DtTypedNamedParameter(name,value)) generateCommand(id,params)

static DtString MAKLogger::DtRuntimeCommandFactory::int64Type ( )
static
static DtString MAKLogger::DtRuntimeCommandFactory::intType ( )
static
virtual bool MAKLogger::DtRuntimeCommandFactory::isBase64Type ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isBoolType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isDoubleType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isFloatType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isInt64Type ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isIntType ( const DtString &  type) const
protectedvirtual
static bool MAKLogger::DtRuntimeCommandFactory::isListType ( const DtString &  )
static

Get whether the type is a list.

virtual bool MAKLogger::DtRuntimeCommandFactory::isRelativeTimeType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isStringListType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isStringType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isTimeType ( const DtString &  type) const
protectedvirtual
virtual bool MAKLogger::DtRuntimeCommandFactory::isVoidPtrType ( const DtString &  type) const
protectedvirtual
static DtString MAKLogger::DtRuntimeCommandFactory::listItemType ( const DtString  listType)
static

Get the list item type from the listType.

void MAKLogger::DtRuntimeCommandFactory::registerCommand ( const DtCommandDefinition )

Method for registering commands.

static DtString MAKLogger::DtRuntimeCommandFactory::relativeTimeType ( )
static
static DtString MAKLogger::DtRuntimeCommandFactory::stringListType ( )
static
static DtString MAKLogger::DtRuntimeCommandFactory::stringType ( )
static
static DtString MAKLogger::DtRuntimeCommandFactory::timeType ( )
static
void MAKLogger::DtRuntimeCommandFactory::unregisterCommand ( const DtCommandDefinition )

Method for unregistering commands.

static DtString MAKLogger::DtRuntimeCommandFactory::voidPtrType ( )
static

Member Data Documentation

DtCommandIdMap MAKLogger::DtRuntimeCommandFactory::myCommandIdMap
protected

A map of command ids to names.

DtCommandNameMap MAKLogger::DtRuntimeCommandFactory::myCommandNameMap
protected

A map of command names to ids.

DtCommandParamMap MAKLogger::DtRuntimeCommandFactory::myCommandParamMap
protected

A map of command ids to a list of parameters.


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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)