artefaktur
software engineer &        architecture

 
 
 
 

DMI Server Mechanism

| DMI Basics | Features Profile | DMI Client Interface | ScriptVar | DMI Server | Using DMI in C++ | DMI with CfgScript | DMI Server Objects | Subclassing | Delegates |


Each ACDK object implements the StdDispatch interface.
This interface provides the basic methods to access member by name and calling function by name dynamically at runtime.


Content of this chapter:

   The implementation interfaces of StdDispatch



 The implementation interfaces of StdDispatch



A base class of acdk::lang::Object and all ACDK classes is  acdk::lang::dmi::StdDispatch.

!

The extract of StdDispatch sources shown below may be outdated.
 
class StdDispatch
{
  // ...
/**
    calls a method of this object
    used in generated stub
    @param fname name of function
    @param ret return value of this function
    @param args arguments of the method
    @param dc client, calling this method
    @param namedArgs The last n values in args are named arguments. 
            if no named arguments passed, caller should pass Nil
    @param flags for the method (like static, public)
    @param methinf If client caches method information
    @throw DmiException in case of DMI-Errors (like wrong parameter)
    @return the called ClazzMethodInfo. Client may use this 
            cache this value for the next call to improve performance
  */
  virtual  const ClazzMethodInfo* standardDispatch(  const char* fname, 
                                                          ScriptVar& ret, 
                                                          ScriptVarArray& args, 
                                                          DmiClient& dc,
                                                          ::acdk::lang::RStringArray namedArgs,
                                                          int flags,
                                                          const ClazzMethodInfo* methinf = 0);
   /**
    This method is the static version of the method above.
    For each ACDK class with metainformation a function pointer a MyClass::StandardDispatch
    will be avaible in the ClazzInfo structure.
    
  */
  static const ClazzMethodInfo* StandardDispatch(const char* fname, 
                                                         ScriptVar& ret, 
                                                         ScriptVarArray& args, 
                                                         DmiClient& dc,
                                                         ::acdk::lang::RStringArray namedArgs,
                                                         int flags,
                                                         const ClazzMethodInfo* methinf = 0);
   /** 
    retreive a static member variable
    @param clazz the ClazzInfo
    @param fieldname name of the member
    @param dc DmiClient to use to convert types
    @param flags normally Modifier::PUBLIC | Modifier::STATIC
    @param type_requested Type for target ScriptVar. if zero no conversion will be done
    @throw NoSuchElementException if given Member not exists
    @throw ParamsMismatchException if type cannot be converted
  */
  static ScriptVar getStaticMember(const ClazzInfo* clazz, const char* fieldname, 
                                   DmiClient& dc, int flags, const ClazzInfo* type_requested = 0);

  /** 
    retreive a member variable of this object
    @param fieldname name of the member
    @param dc DmiClient to use to convert types
    @param flags normally Modifier::PUBLIC
    @param type_requested Type for target ScriptVar. if zero no conversion will be done
    @throw NoSuchElementException if given Member not exists
    @throw ParamsMismatchException if type cannot be converted
  */
  ScriptVar getMember(const char* fieldname, DmiClient& dc, int flags, const ClazzInfo* type_requested = 0);
  
  /** 
    set a static member variable
    core implementetion
    @param clazz the ClazzInfo
    @param fieldname name of the member
    @param newval new value of the member
    @param dc DmiClient to use to convert types
    @param flags normally Modifier::PUBLIC | Modifier::STATIC
    @throw NoSuchElementException if given Member not exists
    @throw ParamsMismatchException if type cannot be converted
  */
  static void setStaticMember(const ClazzInfo* clazz, const char* fieldname, ScriptVar& newval, 
                              DmiClient& dc, int flags);
  
  /** 
    set a member variable.
    This is the core implementetion. You may use poke() instead
    
    @param clazz the ClazzInfo
    @param fieldname name of the member
    @param newval new value of the member
    @param dc DmiClient to use to convert types
    @param flags normally Modifier::PUBLIC 
    @throw NoSuchElementException if given Member not exists
    @throw ParamsMismatchException if type cannot be converted
    @see poke
  */
  void setMember(const char* fieldname, ScriptVar& newval, DmiClient& dc, int flags);
  
  

(See also:  acdk::lang::dmi::StdDispatch)
 
Last modified 2005-05-08 22:23 by SYSTEM By Artefaktur, Ing. Bureau Kommer