libsswf: sswf::ActionStrictMode Class Reference

# sswf::ActionStrictMode Class Reference

This action is used to define the current scripting mode. More...

`#include <libsswf.h>`

Inheritance diagram for sswf::ActionStrictMode:

List of all members.

## Public Member Functions
| ActionStrictMode (TagBase *tag)
| Initialize the ActionStrictMode object.
void | SetStrict (bool strict)
| Change the mode as required.
## Private Member Functions
virtual Action * | Duplicate (void) const
| Create a clone of this ActionStrictMode object.
virtual ErrorManager::error_code_t | ParseData (const Data &data)
| Parse the mode from the Data buffer.
virtual ErrorManager::error_code_t | SaveData (Data &data, Data &nested_data)
| Save the mode in the Data buffer.
## Private Attributes
bool | f_strict

## Detailed Description

It can be strict (i.e. follows JavaScript specification to the letter) or lazy (i.e. accepts old ActionScript commands).

See also:
  SWF Alexis' Reference—Strict Mode

## Constructor & Destructor Documentation

ActionStrictMode::ActionStrictMode | ( | TagBase * | tag | ) |

This constructor marks the mode as not strict.

Use the SetStrict() function to change the mode.

Parameters:

  `[in]` | tag | The tag in which this action is being created

References f_strict.

Referenced by Duplicate().

## Member Function Documentation

Action * ActionStrictMode::Duplicate | ( | void |  | ) | const`[private, virtual]`

This function creates a new ActionStringMode object; it copies 'this' strict mode in the new action and then it returns the pointer of the new action.

Returns:
  The pointer to the new action

Reimplemented from sswf::Action.

References ActionStrictMode(), f_strict, SetStrict(), and sswf::Action::Tag().

ErrorManager::error_code_t ActionStrictMode::ParseData | ( | const Data & | data | ) | `[private, virtual]`

This function parses the strict mode from the Data buffer passed in.

Parameters:

  `[in]` | data | The Data buffer where the strict mode is saved

Returns:
  An error number or ERROR_CODE_NONE.

Reimplemented from sswf::Action.

References sswf::ErrorManager::ERROR_CODE_NONE, f_strict, and sswf::Data::GetByte().

ErrorManager::error_code_t ActionStrictMode::SaveData | ( | Data & | data,
|  | Data & | nested_data |
| ) |  |  | `[private, virtual]`

This function saves the strict mode in the Data buffer passed in.

Parameters:

  `[in]` | data | The Data buffer where the strict mode is saved
  `[in]` | nested_data | The ActionStrictMode has no nested_data

Returns:
  An error number or ERROR_CODE_NONE.

Reimplemented from sswf::Action.

References sswf::ErrorManager::ERROR_CODE_NONE, f_strict, and sswf::Data::PutByte().

void ActionStrictMode::SetStrict | ( | bool | strict | ) |

This function lets you change the mode from strict (true) to lazy (false).

Parameters:

  `[in]` | strict | Set to 'true' to enter strict mode

References f_strict.

Referenced by Duplicate().

## Member Data Documentation

bool sswf::ActionStrictMode::f_strict`[private]`

Referenced by ActionStrictMode(), Duplicate(), ParseData(), SaveData(), and SetStrict().

The documentation for this class was generated from the following files:

- libsswf.h
- libsswf_actions.c++