DataDirector API
|
Format String Converter. More...
#include <DDD_ConvertFormat.h>
Public Member Functions | |
DDD_ConvertFormat (DDD_AttributeObserver *observer) | |
virtual | ~DDD_ConvertFormat () |
virtual bool | Convert (DDD_EndpointList &inputs, DDD_EndpointList &outputs) |
virtual int | MinInputs () |
virtual int | MaxInputs () |
virtual int | MinOutputs () |
virtual int | MaxOutputs () |
virtual const char * | ClassName () |
virtual const char * | Description () |
Public Member Functions inherited from DDD_ConvertBase | |
DDD_ConvertBase () | |
const char * | DataDirectorVersion () |
virtual std::string | EndpointInputName (int index) |
virtual std::string | EndpointOutputName (int index) |
virtual bool | Init (const std::string ¶mStr) |
virtual bool | ConfigurationValid (DDD_EndpointList &inputs, DDD_EndpointList &outputs) |
Public Member Functions inherited from DDD_Base | |
DDD_Base () | |
virtual | ~DDD_Base () |
const char * | GetInstanceName () const |
virtual void | SetInstanceName (const char *name) |
virtual void | SetParams (const DDD_AttributeList ¶ms) |
virtual DDD_AttributeList & | GetParams () |
Static Public Attributes | |
static const char * | CONVERT_FORMAT_CLASSNAME |
Additional Inherited Members | |
Static Public Member Functions inherited from DDD_LogFacade | |
static void | LogDebug (const char *format,...) |
static void | LogInfo (const char *format,...) |
static void | LogWarning (const char *format,...) |
static void | LogError (const char *format,...) |
Protected Member Functions inherited from DDD_ConvertBase | |
bool | InputsOK (int nInputs) |
bool | OutputsOK (int nOutputs) |
Protected Attributes inherited from DDD_Base | |
std::string | _instanceName |
DDD_AttributeList | _params |
Format String Converter.
Formats a string similarly to the way printf does before outputting it. Format specifiers corresponding to parameters (ie- %d
, %s
, %c
, etc) are assigned to the order in which an input is given.
For example:
If the format string is "Value1: \%d Value2: \%f"
, this converter expects at least two inputs and will try to extract the first as an integer and the second as a float. If the second input is missing, the outputted result next to "Value2:"
would be "\#double\#"
.
input: [0,MAX_CONVERTER_INPUT]
ouput: [1,MAX_CONVERTER_OUTPUT]
parameters:
format (string)
DDD_ConvertFormat | ( | DDD_AttributeObserver * | observer | ) |
Constructor
observer | An attribute observer that will observer the parameters of the converter All converter parameters must use this observer for the converter to work right in the Data Director GUI. |
|
virtual |
Destructor
|
inlinevirtual |
Implements DDD_ConvertBase.
|
virtual |
Performs the actual conversion function
inputs | A list of inputs to the converter |
outputs | A list of outputs to the converter |
Implements DDD_ConvertBase.
|
inlinevirtual |
Used by the GUI to explain what this converter does
Implements DDD_ConvertBase.
|
inlinevirtual |
< Maximum number of inputs (limited for performance)
Reimplemented from DDD_ConvertBase.
|
inlinevirtual |
< Maximum number of outputs (limited for performance)
Reimplemented from DDD_ConvertBase.
|
inlinevirtual |
Reimplemented from DDD_ConvertBase.
|
inlinevirtual |
Reimplemented from DDD_ConvertBase.
|
static |
Classname string constant. Needed by the ConverterFactory