#include <script.h>
Public Member Functions | |
| wxScriptVar (const wxScriptVar &var) | |
| Copy constructor. | |
| wxScriptVar (const wxString &type=wxEmptyString, const wxString &content=wxEmptyString) | |
| wxScriptVar (const wxString &type, int *pointer) | |
| This constructor is used to init this variable as a pointer. | |
| virtual | ~wxScriptVar () |
| wxScriptVar & | operator= (const wxScriptVar &tocopy) |
| virtual void | SetType (const wxString &str) |
| Sets the type of this variable; wxScriptTypeInfo::Set() is used. | |
| virtual void | SetContent (const wxString &) |
| Sets the contents of this variable using the given string. | |
| virtual void | SetContent (const wxChar *str) |
| virtual void | SetContent (wxChar *str) |
| virtual void | SetContent (long l) |
| virtual void | SetContent (double l) |
| virtual void | SetContent (bool l) |
| virtual void | SetContent (void *l) |
| virtual void | SetContent (const void *l) |
| void | Set (const wxString &type, const wxString &content) |
| Changes both type & content of this variable. | |
| void | Set (wxScriptTypeGeneric type, char *content) |
| void | Set (wxScriptTypeGeneric type, long content) |
| void | Set (wxScriptTypeGeneric type, double content) |
| void | Set (wxScriptTypeGeneric type, bool content) |
| void | Set (wxScriptTypeGeneric type, void *content) |
| void | Set (wxScriptTypeGeneric type, const wxString &content) |
| virtual void | ResetContent () |
| Sets as empty the current contents (deleting eventually allocated memory). | |
| virtual void | Copy (const wxScriptVar &var) |
| Copies the given wxScriptVar object. | |
| wxScriptTypeInfo | GetType () const |
| Returns the type of this variable. | |
| long | GetContentLong () const |
| Returns the contents of this variable as LONG. | |
| double | GetContentDouble () const |
| Returns the contents of this variable as a DOUBLE. | |
| virtual wxString | GetContentString () const |
| Returns the contents encoded in a string. | |
| virtual void * | GetPointer () const |
| Returns the memory address hold by this variable if it is set as a pointer. | |
Protected Attributes | |
| wxScriptTypeInfo | m_tType |
| The type of this variable. | |
| long | m_content |
| double | m_floatcontent |
|
|
Copy constructor.
|
|
||||||||||||
|
|
|
||||||||||||
|
This constructor is used to init this variable as a pointer. The given type string must end with "*" and the given memory address must be cast to "int *" to avoid ambiguity with the previous constructor. Example: myClass test; wxScriptVar arg1("myClass *", (int *)(&test)); |
|
|
|
|
|
Copies the given wxScriptVar object.
|
|
|
Returns the contents of this variable as a DOUBLE.
|
|
|
Returns the contents of this variable as LONG.
|
|
|
Returns the contents encoded in a string. The content encoding is done using the current type set. This function uses the same encode rules used to decode the content by the SetContent(const wxString &) function. |
|
|
Returns the memory address hold by this variable if it is set as a pointer.
|
|
|
Returns the type of this variable.
|
|
|
|
|
|
Sets as empty the current contents (deleting eventually allocated memory).
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Changes both type & content of this variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sets the contents of this variable using the given string. The content decoding is done using the current type set. This function uses the same decode rules used to encode the content by the GetContentString() function; so, no loss of data should happen if you do: wxScriptVar myvar("bool", "false"); myvar.SetContent(myvar.GetContentString()); |
|
|
Sets the type of this variable; wxScriptTypeInfo::Set() is used.
|
|
|
|
|
|
|
|
|
The type of this variable.
|
1.4.3