FlashValue Class Reference

#include <FlashValue.h>

List of all members.

Public Member Functions

 FlashValue ()
 FlashValue (bool booleanValue)
 FlashValue (int numericValue)
 FlashValue (float numericValue)
 FlashValue (const char *stringValue)
 FlashValue (const wchar_t *stringValue)
 FlashValue (const std::string &stringValue)
 FlashValue (const std::wstring &stringValue)
short getType () const
bool isNull () const
void setNull ()
bool getBool () const
float getNumber () const
std::wstring getString () const


Detailed Description

FlashValue represents a Flash ActionScript variable. The currently supported types are: null, boolean, number, and string.


Constructor & Destructor Documentation

FlashValue::FlashValue (  ) 

Creates a null FlashValue.

FlashValue::FlashValue ( bool  booleanValue  ) 

Creates a FlashValue as a boolean type.

Parameters:
booleanValue The value to initialize this FlashValue with.

FlashValue::FlashValue ( int  numericValue  ) 

Creates a FlashValue as a number type.

Parameters:
numericValue The value to initialize this FlashValue with.

FlashValue::FlashValue ( float  numericValue  ) 

Creates a FlashValue as a number type.

Parameters:
numericValue The value to initialize this FlashValue with.

FlashValue::FlashValue ( const char *  stringValue  ) 

Creates a FlashValue as a string type.

Parameters:
stringValue The value to initialize this FlashValue with.

FlashValue::FlashValue ( const wchar_t *  stringValue  ) 

Creates a FlashValue as a string type.

Parameters:
stringValue The value to initialize this FlashValue with.

FlashValue::FlashValue ( const std::string &  stringValue  ) 

Creates a FlashValue as a string type.

Parameters:
stringValue The value to initialize this FlashValue with.

FlashValue::FlashValue ( const std::wstring &  stringValue  ) 

Creates a FlashValue as a string type.

Parameters:
stringValue The value to initialize this FlashValue with.


Member Function Documentation

short FlashValue::getType (  )  const

Retrieves the FlashType of this FlashValue.

bool FlashValue::isNull (  )  const

Returns whether or not this FlashValue is of a null type.

void FlashValue::setNull (  ) 

Sets this FlashValue as a null type.

bool FlashValue::getBool (  )  const

Retrieves the value as a boolean.

Note:
If the actual value type is FT_BOOLEAN, this directly retrieves the actual value. Otherwise this function will make an interpretation of the value as that of a boolean. Number values will be cast to boolean and string values will be parsed lexically ("true" and "false" are valid). A value type of null will always return false.

float FlashValue::getNumber (  )  const

Retrieves the value as a number.

Note:
If the actual value type is FT_NUMBER, this directly retrieves the actual value. Otherwise this function will make an interpretation of the value as that of a number type. Boolean values will be cast to a number and string values will be parsed lexically. A value type of null will always return '0'.

std::wstring FlashValue::getString (  )  const

Retrieves the value as a string.

Note:
If the actual value type is FT_STRING, this directly retrieves the actual value. Otherwise this function will make an interpretation of the value as that of a string type. Boolean values will either be "true" or "false", number values will be output in standard form, and null value types will always return an empty string.


The documentation for this class was generated from the following file:
Generated on Wed Sep 9 13:38:28 2009 for Flash4UI by  doxygen 1.5.2