Main Page | Class List | Directories | File List | Class Members | File Members

wxScriptFunction Class Reference

An interpreted function. More...

#include <script.h>

List of all members.

Public Member Functions

 wxScriptFunction (const wxString &name=wxEmptyString, const wxString &ret=wxEmptyString, wxScriptTypeInfo *arr=NULL, int n=0)
 Creates & set the properties of the object.
virtual ~wxScriptFunction ()
virtual void DeepCopy (const wxScriptFunction *tocopy)
 Deep copies the function.
virtual wxScriptFunctionClone () const =0
 Returns a clone of this object.
virtual bool Match (const wxScriptTypeInfo *ret, int argc,...)
 Checks if this function has the given return type, argument count and argument types.
virtual bool Exec (wxScriptVar &ret, wxScriptVar *arg) const =0
 Executes the function script.
virtual void Set (const wxString &name, const wxString &ret, wxScriptTypeInfo *arr, int n)
 Sets the name, return type and arguments of this scripted function.
wxString GetName () const
 Returns the name of this function.
int GetArgCount () const
 Returns the number of arguments accepted by this function.
wxScriptTypeInfo GetRetType () const
 Returns the type of the return value of this function.
wxScriptTypeInfo GetArgType (int n) const
 Returns the type of the n-th argument required by this function.

Protected Member Functions

wxString GetCallString (wxScriptVar *arr) const
 Returns the "call string"; that is, the string containing function name + wxT("(") + arg[n]->GetContentString() + ")".

Protected Attributes

wxString m_strName
 The name of the function.
wxScriptTypeInfo m_tReturn
 The return type of the function.
wxScriptTypeInfo m_pArgList [wxSCRIPTFNC_MAX_ARGS]
 The argument type array.
int m_nArgCount
 The number of entries of m_pArgList array.


Detailed Description

An interpreted function.


Constructor & Destructor Documentation

wxScriptFunction::wxScriptFunction const wxString &  name = wxEmptyString,
const wxString &  ret = wxEmptyString,
wxScriptTypeInfo arr = NULL,
int  n = 0
[inline]
 

Creates & set the properties of the object.

virtual wxScriptFunction::~wxScriptFunction  )  [inline, virtual]
 


Member Function Documentation

virtual wxScriptFunction* wxScriptFunction::Clone  )  const [pure virtual]
 

Returns a clone of this object.

The caller must delete the returned object when it's no longer useful.

virtual void wxScriptFunction::DeepCopy const wxScriptFunction tocopy  )  [inline, virtual]
 

Deep copies the function.

virtual bool wxScriptFunction::Exec wxScriptVar ret,
wxScriptVar arg
const [pure virtual]
 

Executes the function script.

int wxScriptFunction::GetArgCount  )  const [inline]
 

Returns the number of arguments accepted by this function.

wxScriptTypeInfo wxScriptFunction::GetArgType int  n  )  const [inline]
 

Returns the type of the n-th argument required by this function.

wxString wxScriptFunction::GetCallString wxScriptVar arr  )  const [protected]
 

Returns the "call string"; that is, the string containing function name + wxT("(") + arg[n]->GetContentString() + ")".

wxString wxScriptFunction::GetName  )  const [inline]
 

Returns the name of this function.

wxScriptTypeInfo wxScriptFunction::GetRetType  )  const [inline]
 

Returns the type of the return value of this function.

bool wxScriptFunction::Match const wxScriptTypeInfo ret,
int  argc,
  ...
[virtual]
 

Checks if this function has the given return type, argument count and argument types.

void wxScriptFunction::Set const wxString &  name,
const wxString &  ret,
wxScriptTypeInfo arr,
int  n
[virtual]
 

Sets the name, return type and arguments of this scripted function.


Member Data Documentation

int wxScriptFunction::m_nArgCount [protected]
 

The number of entries of m_pArgList array.

wxScriptTypeInfo wxScriptFunction::m_pArgList[wxSCRIPTFNC_MAX_ARGS] [protected]
 

The argument type array.

wxString wxScriptFunction::m_strName [protected]
 

The name of the function.

wxScriptTypeInfo wxScriptFunction::m_tReturn [protected]
 

The return type of the function.


The documentation for this class was generated from the following files:
Generated on Wed Jul 6 20:21:28 2005 for wxScript by  doxygen 1.4.3