ADTF  3.18.2
scriptable_intf.h
Go to the documentation of this file.
1 
8 #ifndef _ADTF_UCOM_ANT_SCRIPTABLE_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_SCRIPTABLE_INTERFACE_INCLUDES_HEADER_
10 
11 namespace adtf
12 {
13 namespace ucom
14 {
15 namespace ant
16 {
17 
26 class DOEXPORT IScriptable : public IObject
27 {
28 public:
33  ADTF_IID(IScriptable, "scriptable.ant.ucom.adtf.iid");
34 
35  public:
37  typedef const char* tScriptArgs;
38 
39  public:
51  virtual tResult ScriptRunCommand(const char* strCommand,
52  void* pvData=NULL,
53  int szData=0) = 0;
54 
55 
56  protected:
58  ~IScriptable() = default;
59 };
60 
62 #define __script_cmd0(cmd) "<cmd name=\"" cmd "\" />"
63 
65 #define __script_cmd1(cmd \
66  , arg_name1, arg_value1 \
67  ) \
68  "<cmd name=" #cmd " " \
69  #arg_name1 "=" #arg_value1 " " \
70  "/>"
71 
73 #define __script_cmd2(cmd \
74  , arg_name1, arg_value1 \
75  , arg_name2, arg_value2 \
76  ) \
77  "<cmd name=" #cmd " " \
78  #arg_name1 "=" #arg_value1 " " \
79  #arg_name2 "=" #arg_value2 " " \
80  "/>"
81 
83 #define __script_cmd3(cmd \
84  , arg_name1, arg_value1 \
85  , arg_name2, arg_value2 \
86  , arg_name3, arg_value3 \
87  ) \
88  "<cmd name=" #cmd " " \
89  #arg_name1 "=" #arg_value1 " " \
90  #arg_name2 "=" #arg_value2 " " \
91  #arg_name3 "=" #arg_value3 " " \
92  "/>"
93 
94 }//namespace ant
95 
98 
99 }//namespace ucom
100 }//namespace adtf
101 
102 //*************************************************************************************************
103 #endif //_ADTF_UCOM_ANT_SCRIPTABLE_INTERFACE_INCLUDES_HEADER_
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
The IScriptable interface provides a generic way to implement scripting capabilities.
ADTF_IID(IScriptable, "scriptable.ant.ucom.adtf.iid")
Marks the IScriptable to be castable with the ucom_cast<>
~IScriptable()=default
Protected destructor --> Use implemented Destroy() instead of delete!
virtual tResult ScriptRunCommand(const char *strCommand, void *pvData=NULL, int szData=0)=0
Run script command.
const char * tScriptArgs
Standard scripting argument type.
ant::IScriptable IScriptable
Alias always bringing the latest version of ant::IScriptable into scope.
Namespace for entire ADTF SDK.