Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
acdkx::com::ComObject Class Reference#include <ComObject.h>
Inheritance diagram for acdkx::com::ComObject:
List of all members.
Detailed Description
Proxy to a scriptable COM ojbect.
With a ComObject a ActiveX acdk::lang::Object can be used, quite similar it can be done in Visual Basic or other Windows Host scripting languages.
C++ acdk RComObject obj = ComObject::New(Word.Application);
obj->poke(Visible, ScriptVar(true)); RComObject docs = obj->peekI(Documents); RComObject doc = docs->invokeI(Add, ); RComObject sel = obj->peekI(ActiveWindow)->peekI(Selection); RString s(This is ACDK); sel->invokev(TypeText, S, RString(This is )); sel->peekI(Font)->poke(Bold, true); sel->invokev(TypeText, S, RString(ACDK )); sel->peekI(Font)->poke(Bold, false); sel->invokev(TypeText, S, RString(instrumenting Word!));
Thread::sleep(3000);
obj->invokev(Quit, i, 0);
This class can also used in scripting enviromnents: (defun say-word-hello () (set cls (invoke (invoke-static 'acdk.lang.ClassLoader 'getSystemClassLoader) 'findClass 'acdkx.com::ComObject)) (set app (invoke-static 'acdkx.com::ComObject 'New Word.Application)) (poke app 'Visible T) (set doc (invoke (peek app 'Documents) 'Add)) (set sel (peek (peek app 'ActiveWindow) 'Selection)) (invoke sel 'TypeText This is ) (poke (peek sel 'Font) 'Bold 1) (invoke sel 'TypeText ACDK) (poke (peek sel 'Font) 'Bold 0) (invoke sel 'TypeText instrumenting Word through acdklisp) (sleep 3000) (invoke app 'Quit 0) )
|
Public Member Functions |
virtual::acdk::lang::dmi::ClazzInfo * | getClazzInfo () |
| not using the standard meta info, becuase this class is used as a proxy
|
static::acdk::lang::dmi::ClazzInfo * | clazzInfo () |
| return the ClazzInfo for this class will be re-implemented for each class by methods generated by acdkmc
|
virtual::acdk::lang::RClass | getClass () |
static::acdk::lang::RClass | GetClass () |
static::acdk::lang::RObject | create_array (int length=0) |
static::acdk::lang::RObject | create_array_array (int firstLength=0, int secondLength=0) |
virtual void | getCollectableFields (FieldReferences &fields) |
| retrun the collectable fields of this object (all Objects fields) will be re-implemented for each class by methods generated by acdkmc If this is manually implemented, the flag ObjectHasLocalGc should be set.
|
virtual::acdk::lang::dmi::SysFields | getInternalFields (int flags, const::acdk::lang::dmi::ClazzInfo *clazz=0) |
virtual::acdk::lang::dmi::ScriptVar | getMember (IN(RString) fieldname,::acdk::lang::dmi::DmiClient &dc, int flags, const::acdk::lang::dmi::ClazzInfo *type_requested=0) |
virtual void | setMember (IN(RString) fieldname, const::acdk::lang::dmi::ScriptVar &newval,::acdk::lang::dmi::DmiClient &dc, int flags) |
| ComObject (IN(RIDispatch) id=0) |
| Internal to wrapp a IDispatch interface with ComObject.
|
| ComObject (IN(RString) classname) |
virtual acdk::lang::dmi::ScriptVar | New (IN(RString) classname, acdk::lang::dmi::ScriptVarArray &args) |
static::acdk::lang::dmi::ScriptVar | New (IN(RString) classname) |
| creates a new COM acdk::lang::Object.
|
void | unwrapAcdkObject (bool flag) |
| Should an wrapped ACDK acdk::lang::Object parameter be unwrapped or not If flag is false, the DMI interface returns ComObject's (except String) otherwise the type will be casted.
|
bool | unwrapAcdkObject () |
::IDispatch * | getIDispatch () |
Static Public Member Functions |
const::acdk::lang::dmi::ClazzMethodInfo * | _invoke_dynamic (::acdk::lang::Object *This, IN(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) |
const::acdk::lang::dmi::ClazzMethodInfo * | _invoke_static (IN(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) |
Private Attributes |
static::acdk::lang::dmi::ClazzInfo | _clazzInfo |
::RIDispatch | _idispatch |
bool | _unwrapDmiObject |
Constructor & Destructor Documentation
acdkx::com::ComObject::ComObject |
( |
IN(RIDispatch) |
id = 0 |
) |
[inline] |
|
acdkx::com::ComObject::ComObject |
( |
IN(RString) |
classname |
) |
|
|
Member Function Documentation
static ::acdk::lang::RObject acdkx::com::ComObject::create_array_array |
( |
int |
firstLength = 0, |
|
|
int |
secondLength = 0 |
|
) |
[inline] |
|
virtual void acdkx::com::ComObject::getCollectableFields |
( |
FieldReferences & |
fields |
) |
[inline, virtual] |
|
|
retrun the collectable fields of this object (all Objects fields) will be re-implemented for each class by methods generated by acdkmc If this is manually implemented, the flag ObjectHasLocalGc should be set.
Reimplemented from acdk::lang::ObjectBase. |
::IDispatch* acdkx::com::ComObject::getIDispatch |
( |
|
) |
[inline] |
|
virtual void acdkx::com::ComObject::setMember |
( |
IN(RString) |
fieldname, |
|
|
const::acdk::lang::dmi::ScriptVar & |
newval, |
|
|
::acdk::lang::dmi::DmiClient & |
dc, |
|
|
int |
flags |
|
) |
[virtual] |
|
bool acdkx::com::ComObject::unwrapAcdkObject |
( |
|
) |
[inline] |
|
void acdkx::com::ComObject::unwrapAcdkObject |
( |
bool |
flag |
) |
[inline] |
|
|
Should an wrapped ACDK acdk::lang::Object parameter be unwrapped or not If flag is false, the DMI interface returns ComObject's (except String) otherwise the type will be casted.
|
Member Data Documentation
|