Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Public Member Functions | Protected Member Functions

This class is the base class for all user-defined types. More...

#include <ilserver/mvvalue.h>

Inheritance diagram for IlsMvUserType:
IlsMvMessage MvArray MvDateTime MvKeyValueTable

Public Member Functions

virtual ~IlsMvUserType ()
 Virtual destructor.
 
Controlled Conversion
virtual IlsBoolean asBoolean (IlsBoolean defaultVal=IlsFalse) const
 Called by IlsMvValue::asBoolean() when the instance of IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual char asChar (char defaultVal=0) const
 Called by IlsMvValue::asChar() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual long asLong (long defaultVal=0) const
 Called by IlsMvValue::asLong() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual float asFloat (float defaultVal=0.0) const
 Called by IlsMvValue::asFloat() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual double asDouble (double defaultVal=0.0) const
 Called by IlsMvValue::asDouble() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual IlsString asString (IlsString defaultVal=(char *) 0) const
 Called by IlsMvValue::asString() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual IlsMvRef asObjectRef (IlsMvRef defaultVal=IlsMvRef()) const
 Called by IlsMvValue::asObjectRef() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined. More...
 
virtual IlsMvUserTypeasValue (IlsMvDataType typeId, IlsMvUserType *defaultVal=0) const
 Called by Rogue Wave Server when it needs to convert a user type value into another user type. More...
 
Comparison Operators
virtual IlsBoolean operator== (const IlsMvUserType &v) const
 Called by the operator IlsMvValue::operator==() when the object and the argument to which it applies contain user-defined type values. More...
 
virtual IlsBoolean operator!= (const IlsMvUserType &v) const
 Called by the operator IlsMvValue::operator!=() when the object and the argument to which it applies contain user-defined type values. More...
 
virtual IlsBoolean operator< (const IlsMvUserType &) const
 Called by the operator IlsMvValue::operator<() when the object and the argument to which it applies contain user-defined type values. More...
 
virtual IlsBoolean operator> (const IlsMvUserType &) const
 Called by the operator IlsMvValue::operator>() when the object and the argument to which it applies contain user-defined type values. More...
 
virtual IlsBoolean operator<= (const IlsMvUserType &) const
 Called by the operator IlsMvValue::operator<=() when the object and the argument to which it applies contain user-defined type values. More...
 
virtual IlsBoolean operator>= (const IlsMvUserType &) const
 Called by the operator IlsMvValue::operator>=() when the object and the argument to which it applies contain user-defined type values. More...
 
virtual IlsBoolean operator! () const
 Called by the operator IlsMvValue::operator!() when the object and the argument to which it applies contain user-defined type values. More...
 
Unparsing
virtual IlsLogfileprint (IlsLogfile &) const
 Called in trace mode to display a value whose type is user-defined. More...
 

Protected Member Functions

 IlsMvUserType ()
 The default constructor of the class is protected.
 

Encoding/Decoding

virtual IlsMvMessageilsEncode (IlsMvMessage &) const =0
 This pure virtual member function is called to encode a value whose type is user-defined in an instance of IlsMvMessage. More...
 
static IlsMvUserTypeIlsDecode (IlsMvMessage &)
 This static member function is called by Server to extract a user-type value from a message. More...
 

Detailed Description

This class is the base class for all user-defined types.

Library: mvserver
and mvcomp

It enables you to assign such types to runtime attributes of server object types or to runtime attributes of representation object types. See the macro ILS_USERTYPE_DECL()/ILS_USERTYPE_DEF() for details on how to declare such a type.

This class also lets you pass values of any types to functions that take the type IlsMvValue as a parameter, such as the virtual callbacks to member functions in the IlsRpObject class and the function IlsMvComponent::execUserAsyncCallback().

See also
IlsMvComponent, IlsMvMessage, IlsMvValue, IlsRpObject, ILS_USERTYPE_DECL()/ILS_USERTYPE_DEF().

Member Function Documentation

◆ asBoolean()

virtual IlsBoolean IlsMvUserType::asBoolean ( IlsBoolean  defaultVal = IlsFalse) const
virtual

Called by IlsMvValue::asBoolean() when the instance of IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

◆ asChar()

virtual char IlsMvUserType::asChar ( char  defaultVal = 0) const
virtual

Called by IlsMvValue::asChar() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

◆ asDouble()

virtual double IlsMvUserType::asDouble ( double  defaultVal = 0.0) const
virtual

Called by IlsMvValue::asDouble() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

◆ asFloat()

virtual float IlsMvUserType::asFloat ( float  defaultVal = 0.0) const
virtual

Called by IlsMvValue::asFloat() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

◆ asLong()

virtual long IlsMvUserType::asLong ( long  defaultVal = 0) const
virtual

Called by IlsMvValue::asLong() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

Reimplemented in MvDateTime.

◆ asObjectRef()

virtual IlsMvRef IlsMvUserType::asObjectRef ( IlsMvRef  defaultVal = IlsMvRef()) const
virtual

Called by IlsMvValue::asObjectRef() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

◆ asString()

virtual IlsString IlsMvUserType::asString ( IlsString  defaultVal = (char *) 0) const
virtual

Called by IlsMvValue::asString() when the object of type IlsMvValue to which it applies contains an object whose type is user-defined.

It returns defaultVal.

It can be overridden.

Reimplemented in MvArray, and MvDateTime.

◆ asValue()

virtual IlsMvUserType* IlsMvUserType::asValue ( IlsMvDataType  typeId,
IlsMvUserType defaultVal = 0 
) const
virtual

Called by Rogue Wave Server when it needs to convert a user type value into another user type.

This function returns the null pointer but can be overridden.

◆ IlsDecode()

static IlsMvUserType* IlsMvUserType::IlsDecode ( IlsMvMessage )
static

This static member function is called by Server to extract a user-type value from a message.

It first extracts the name of the user type, then looks for a decoding function declared for this type. This decoding function is implicitly declared by the macro ILS_USERTYPE_DEF() associated with each user type deriving from IlsMvUserType. If the decoding function is found, it is used to extract the user type value. Otherwise, the message is assigned with the failure status (see IlsMvMessage::setFail()).

◆ ilsEncode()

virtual IlsMvMessage& IlsMvUserType::ilsEncode ( IlsMvMessage ) const
pure virtual

This pure virtual member function is called to encode a value whose type is user-defined in an instance of IlsMvMessage.

It must be overridden. Declaring the macro ILS_USERTYPE_DECL() in a derived class implicitly overrides this member function.

◆ operator!()

virtual IlsBoolean IlsMvUserType::operator! ( ) const
virtual

Called by the operator IlsMvValue::operator!() when the object and the argument to which it applies contain user-defined type values.

It returns IlsTrue and can be overridden.

◆ operator!=()

virtual IlsBoolean IlsMvUserType::operator!= ( const IlsMvUserType v) const
virtual

Called by the operator IlsMvValue::operator!=() when the object and the argument to which it applies contain user-defined type values.

It returns IlsTrue and can be overridden.

Reimplemented in MvArray, and MvDateTime.

◆ operator<()

virtual IlsBoolean IlsMvUserType::operator< ( const IlsMvUserType ) const
virtual

Called by the operator IlsMvValue::operator<() when the object and the argument to which it applies contain user-defined type values.

It returns IlsFalse and can be overridden.

Reimplemented in MvDateTime.

◆ operator<=()

virtual IlsBoolean IlsMvUserType::operator<= ( const IlsMvUserType ) const
virtual

Called by the operator IlsMvValue::operator<=() when the object and the argument to which it applies contain user-defined type values.

It returns IlsFalse and can be overridden.

Reimplemented in MvDateTime.

◆ operator==()

virtual IlsBoolean IlsMvUserType::operator== ( const IlsMvUserType v) const
virtual

Called by the operator IlsMvValue::operator==() when the object and the argument to which it applies contain user-defined type values.

It returns IlsFalse and can be overridden.

Reimplemented in MvArray, and MvDateTime.

◆ operator>()

virtual IlsBoolean IlsMvUserType::operator> ( const IlsMvUserType ) const
virtual

Called by the operator IlsMvValue::operator>() when the object and the argument to which it applies contain user-defined type values.

It returns IlsFalse and can be overridden.

Reimplemented in MvDateTime.

◆ operator>=()

virtual IlsBoolean IlsMvUserType::operator>= ( const IlsMvUserType ) const
virtual

Called by the operator IlsMvValue::operator>=() when the object and the argument to which it applies contain user-defined type values.

It returns IlsFalse and can be overridden.

Reimplemented in MvDateTime.

◆ print()

virtual IlsLogfile& IlsMvUserType::print ( IlsLogfile ) const
virtual

Called in trace mode to display a value whose type is user-defined.

It as no effect but can be overridden.

Reimplemented in MvDateTime.