INOS
CINOSTaskExMsgParam Class Reference
Inheritance diagram for CINOSTaskExMsgParam:

Classes

class  CPtrContainer< void * >
 

Public Types

enum  { ePrintfFormatMaxSize = 4 }
 Some constants. More...
 
enum  { eFlgMandatory = 0x00000001 , eFlgNoSubstitution = 0x00000002 , eFlgOversized = 0x00000004 , eFlgStructure = 0x0000008 }
 

Public Member Functions

charGetName ()
 
const charGetName () const
 
uint16 GetType () const
 
uint32 GetFlag ()
 get param flags
 
uint32 GetTypeSize () const
 
const std::type_info * GetTypeInfo () const
 
voidGetValue ()
 
const voidGetValue () const
 
template<typename T >
T GetTypedValue () const
 
template<typename T >
uint32 SetTypedValue (T aValue)
 SetTypedValue.
 
uint32 SetTypedValue (const char *value)
 SetTypedValue, makes the cast internally.
 
uint32 GetValueBufferSize ()
 
void SetValue (const char *apValue, bool abInINCOVContext)
 
void SetValue (const void *apValue, const uint32 auDataLength, bool abInINCOVContext)
 
void SetName (const char *apName)
 
virtual void SetFlag (uint32 auFlag)
 
virtual void ClearFlag (uint32 auFlag)
 
bool IsNumber () const
 
bool IsString () const
 
void ToString (char *apDest, uint32 aSize)
 Writes the string representation into the buffer, always 0 determinated.
 
void AddPrintfFormat (char *&apDest, bool abWithReadabilitySupport)
 
int32 ToINCOValue (uint16 *apINCOType, uint8 *apINCOValue, const uint32 auBufferSize, const uint32 auDataLength, const bool abCut=false) const
 
CINOSTaskExMsgParamGetNext () const
 
void SetNext (CINOSTaskExMsgParam *apParam)
 
virtual real64 GetMinValue ()
 
virtual real64 GetMaxValue ()
 
virtual const charGetUnit ()
 
virtual uint64 GetCharacteristics ()
 
virtual const charGetComboData ()
 
template<typename T >
 CINOSTaskExMsgParam (T aValue, const char *apName=NULL, bool abInINCOVContext=false)
 
 CINOSTaskExMsgParam (char *aValue, const char *apName=NULL, bool abInINCOVContext=false)
 
 CINOSTaskExMsgParam (const char *aValue, const char *apName=NULL, bool abInINCOVContext=false)
 
 CINOSTaskExMsgParam (CINOSTaskExMsgParam &&a)
 Move CTOR used by e.g. CINCOVServerSession::AsyncResultReady.
 
virtual CINOSTaskExMsgParamClone ()
 clone function (to be able to copy also derived member variables)
 
virtual ~CINOSTaskExMsgParam ()
 destructor
 
template<>
charGetTypedValue () const
 
template<>
const charGetTypedValue () const
 

Friends

class CINOSTaskEx
 
class CINOSTaskExMsg
 
class CINOSTaskExMsgDefaultParam
 
class CINOSTaskExTracer
 
class CINOSEvtLogMsgArg
 
class CMcResult
 
class CMcResultStream
 
class CINOSMovePath
 

Member Enumeration Documentation

◆ anonymous enum

Some constants.

Enumerator
ePrintfFormatMaxSize 

Max amount of added chars by AddPrintfFormat. e.g. for strings: "%s", pointers: 0xp

Constructor & Destructor Documentation

◆ CINOSTaskExMsgParam() [1/3]

template<typename T >
CINOSTaskExMsgParam::CINOSTaskExMsgParam ( T  aValue,
const char apName = NULL,
bool  abInINCOVContext = false 
)
inline

constructor. Basic version that (theoretically) takes an arbitrary value type. Sets the type, size, etc. of the msg param. It is not used for "char*" and "const char*" for those types The overloaded version below is used. In case of a pointer type the correct const type should be used: Non-const declares that the ownership of the pointer is moved to the message, const declares that the ownership stays with the caller.

◆ CINOSTaskExMsgParam() [2/3]

CINOSTaskExMsgParam::CINOSTaskExMsgParam ( char aValue,
const char apName = NULL,
bool  abInINCOVContext = false 
)
inline

constructor. Overloaded version that takes an non-const char* value type. Sets the type, size, etc. of the msg param.

◆ CINOSTaskExMsgParam() [3/3]

CINOSTaskExMsgParam::CINOSTaskExMsgParam ( const char aValue,
const char apName = NULL,
bool  abInINCOVContext = false 
)
inline

constructor. Overloaded version that takes an const char* value type. Sets the type, size, etc. of the msg param.

Member Function Documentation

◆ AddPrintfFormat()

void CINOSTaskExMsgParam::AddPrintfFormat ( char *&  apDest,
bool  abWithReadabilitySupport 
)

Adds printf-formatting to apDest. The used printf-format depends on the m_uType. E.g. if this is a INCO-uint32 type, then the charachter "%u" will be added to apDest.

Parameters
apDestThe char-buffer to which the printf-format will be added. The function guarantees not to add more than ePrintfFormatMaxSize characters. Therefore, apDest must point to a buffer of at least that size. It has been implemented like this (in favor of passing the buffersize along with it) to make calling code easier/faster.

◆ Clone()

virtual CINOSTaskExMsgParam * CINOSTaskExMsgParam::Clone ( )
inlinevirtual

clone function (to be able to copy also derived member variables)

Reimplemented in CINOSTaskExMsgDefaultParam.

◆ GetNext()

CINOSTaskExMsgParam * CINOSTaskExMsgParam::GetNext ( ) const
inline
Returns
The pointer to the next CINOSTaskExMsgParam. NULL if "no next" is available.

◆ GetTypedValue()

template<typename T >
T CINOSTaskExMsgParam::GetTypedValue ( ) const
inline

GetTypedValue, makes the cast internally and takes care of pointer types. Returns NULL for incorrect pointer types.

◆ GetTypeSize()

uint32 CINOSTaskExMsgParam::GetTypeSize ( ) const
inline
Returns
e.g. 4 in case of uint32, 8 in case of double. For strings, 0 is returned.

◆ GetValueBufferSize()

uint32 CINOSTaskExMsgParam::GetValueBufferSize ( )
inline
Returns
The available buffer size of this object

◆ SetValue()

void CINOSTaskExMsgParam::SetValue ( const void apValue,
const uint32  auDataLength,
bool  abInINCOVContext 
)

Used to set/copy arbitrary data into the internal buffer. auDataLength can be at most DF_INOS_TASKEXMSGPARAM_MAX_SIZE.

◆ ToINCOValue()

int32 CINOSTaskExMsgParam::ToINCOValue ( uint16 apINCOType,
uint8 apINCOValue,
const uint32  auBufferSize,
const uint32  auDataLength,
const bool  abCut = false 
) const

Writes the parameter in the "INCO notation", means: it's INCO type and value to apINCOType and apINCOValue, respectively. It does so by taking into account the remaining buffer size (auBufferSize) as well as the data alignment (depending on auDataLength). Some comment on the data layout can be read in the class documentation of CMcResultStream.

Returns
A positive number means success and equals to the count of bytes written to apINCOValue. A negative number means that nothing has been written becuase auBufferSize was to small. The returned negative number equals to the count of bytes that would additionally be required to write the data. If abCut is set to true and the param does not fit into the buffer, it is simply cut

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