C12Adapter Opensource C++ Interface
MServiceDefinition Class Reference

Service definition of the object. More...

Public Types

enum  { MAXIMUM_SERVICE_NAME_LENGTH = 40 }
 

Public Member Functions

bool IsClassService () const
 True if this is a class service rather than an object service. More...
 
const MVariant::TypeGetParameterTypes () const
 Return an array of parameter types. More...
 
unsigned GetNumberOfParameters () const
 Return the number of parameters of this service. More...
 
MVariant::Type GetReturnType () const
 Return service type, or MVariant::VAR_EMPTY if this is a procedure. More...
 
bool IsProcedure () const
 Whether this service is procedure or function. More...
 

Public Attributes

char m_name [MAXIMUM_SERVICE_NAME_LENGTH]
 Name of the service. More...
 
int m_overloadedNumberOfParameters
 If the procedure has overloaded parameters, this is the number of them. More...
 
MClass::ServiceType m_type
 Service type.
 
MObject::Method m_objectMethod
 Object method, valid only if the service type denotes the object method, otherwise NULL.
 
MClass::Method m_classMethod
 Class method, valid only if the service type denotes the class method, otherwise NULL.
 

Detailed Description

Service definition of the object.

There are the following types of services: constructors, object methods, and class methods. Using this definition, the service marshalling is implemented. The user can gain access to this structure to acquire the attributes of the service.

The service definitions are stored in an array with the special last service definition having an empty name.

Member Function Documentation

unsigned MServiceDefinition::GetNumberOfParameters ( ) const

Return the number of parameters of this service.

Precondition
The object is built correctly. There are some debug asserts.
const MVariant::Type* MServiceDefinition::GetParameterTypes ( ) const

Return an array of parameter types.

Precondition
The object is built correctly. There are some debug asserts.
MVariant::Type MServiceDefinition::GetReturnType ( ) const

Return service type, or MVariant::VAR_EMPTY if this is a procedure.

Precondition
The object is built correctly. There are some debug asserts.
bool MServiceDefinition::IsClassService ( ) const
inline

True if this is a class service rather than an object service.

Class service is called static service in C++.

Precondition
The parameter is in range of ServiceType enumeration. There is a debug check.
bool MServiceDefinition::IsProcedure ( ) const
inline

Whether this service is procedure or function.

Precondition
The object is built correctly. There are some debug asserts.

Member Data Documentation

char MServiceDefinition::m_name[MAXIMUM_SERVICE_NAME_LENGTH]

Name of the service.

Internally, if the name is a string containing only binary zeros, it means this structure is the last in the service list.

int MServiceDefinition::m_overloadedNumberOfParameters

If the procedure has overloaded parameters, this is the number of them.

If this is not an overloaded procedure, this value is -1.