2005/5/9

     
 

class SetDispatchAttribute

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::tools::mc::SetDispatchAttribute Class Reference

#include <SetDispatchAttribute.h>

Inheritance diagram for acdk::tools::mc::SetDispatchAttribute:

acdk::tools::mc::CodeAttribute acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

With this attribute the dmi dispatch method for a class (static or dynamic methods), a method or a field can be set.

// sample
// by default all non-static dmi calls are passed to the DispatchTest::stddispatch
// method
ACDK_CLASSATTRIBUTE(acdk.tools.mc.SetDispatchAttribute(DispatchTest::stddispatch, false))
class DispatchTest
: public acdk::lang::Object
{
  ACDK_WITH_METAINFO(DispatchTest)
public:
  static const ::acdk::lang::dmi::ClazzMethodInfo* stddispatch(
                                                        ::acdk::lang::Object* This, 
                                                         IN(acdk::lang::RString) fname, 
                                                         ::acdk::lang::dmi::ScriptVar& ret, 
                                                         ::acdk::lang::dmi::ScriptVarArray& args, 
                                                         ::acdk::lang::dmi::DmiClient& dc,
                                                         IN(::acdk::lang::RStringArray) namedArgs,
                                                         int flags,
                                                         const ::acdk::lang::dmi::ClazzInfo* clazzinfo,
                                                         const ::acdk::lang::dmi::ClazzMethodInfo* methinf)
   {
   }
   static const ::acdk::lang::dmi::ClazzMethodInfo* fooDispatch(
                                                        ::acdk::lang::Object* This, 
                                                         IN(acdk::lang::RString) fname, 
                                                         ::acdk::lang::dmi::ScriptVar& ret, 
                                                         ::acdk::lang::dmi::ScriptVarArray& args, 
                                                         ::acdk::lang::dmi::DmiClient& dc,
                                                         IN(::acdk::lang::RStringArray) namedArgs,
                                                         int flags,
                                                         const ::acdk::lang::dmi::ClazzInfo* clazzinfo,
                                                         const ::acdk::lang::dmi::ClazzMethodInfo* methinf)
   {
   }
   // set dmi method for foo to fooDispatch
  ACDK_METHODATTRIBUTE(acdk.tools.mc.SetDispatchAttribute(DispatchTest::fooDispatch, false))
  void foo(IN(RString) str) {}

  ACDK_FIELDATTRIBUTE(acdk.tools.mc.SetDispatchAttribute(DispatchTest::dummyacc, false))
  RObject dummyvar;

  static const ::acdk::lang::dmi::ClazzFieldInfo* dummyacc(
                                    ::acdk::lang::Object* This, 
                                      IN(acdk::lang::RString) fname, 
                                      ::acdk::lang::dmi::ScriptVar& var, 
                                      ::acdk::lang::dmi::DmiClient& dc,
                                      int flags,
                                      const ::acdk::lang::dmi::ClazzInfo* clazzinfo,
                                      const ::acdk::lang::dmi::ClazzFieldInfo* fieldinf)
  {
  }
};


Public Member Functions

 SetDispatchAttribute (IN(RString) signature=, bool staticCall=false)
virtual bool apply (IN(RCodeInfo) cm)
virtual bool apply (IN(RModuleInfo) cm)
virtual bool apply (IN(RClassInfo) cm)
virtual bool apply (IN(RMethodInfo) cm)
virtual bool apply (IN(RArgumentInfo) cm)
virtual bool apply (IN(RFieldInfo) cm)
bool attachAttribute (IN(RCodeInfo) ci)

Static Public Member Functions

void initAttribute (IN(RMetaCompiler) mc)

Public Attributes

RString _functionSignature
bool _staticCall


Constructor & Destructor Documentation

acdk::tools::mc::SetDispatchAttribute::SetDispatchAttribute IN(RString signature = ,
bool  staticCall = false
 


Member Function Documentation

virtual bool acdk::tools::mc::SetDispatchAttribute::apply IN(RFieldInfo cm  )  [virtual]
 

virtual bool acdk::tools::mc::SetDispatchAttribute::apply IN(RArgumentInfo cm  )  [virtual]
 

virtual bool acdk::tools::mc::SetDispatchAttribute::apply IN(RMethodInfo cm  )  [virtual]
 

virtual bool acdk::tools::mc::SetDispatchAttribute::apply IN(RClassInfo cm  )  [virtual]
 

virtual bool acdk::tools::mc::SetDispatchAttribute::apply IN(RModuleInfo cm  )  [virtual]
 

virtual bool acdk::tools::mc::SetDispatchAttribute::apply IN(RCodeInfo cm  )  [virtual]
 

Reimplemented from acdk::tools::mc::CodeAttribute.

bool acdk::tools::mc::SetDispatchAttribute::attachAttribute IN(RCodeInfo ci  ) 
 

Reimplemented from acdk::tools::mc::CodeAttribute.

void acdk::tools::mc::SetDispatchAttribute::initAttribute IN(RMetaCompiler mc  )  [static]
 

Reimplemented from acdk::tools::mc::CodeAttribute.


Member Data Documentation

RString acdk::tools::mc::SetDispatchAttribute::_functionSignature
 

bool acdk::tools::mc::SetDispatchAttribute::_staticCall