libsswf: sswf::ActionLabel Class Reference

# sswf::ActionLabel Class Reference

Create a label in an action script. More...

`#include <libsswf.h>`

Inheritance diagram for sswf::ActionLabel:

List of all members.

## Public Member Functions
| ActionLabel (TagBase *tag)
| Initialize an ActionLabel.
const char * | GetLabel (void) const
| Get the name of this label.
void | SetLabel (const char *label)
| Set the name of an ActionLabel.
## Private Member Functions
virtual Action * | Duplicate (void) const
| Create a duplicate of the label.
## Private Attributes
char * | f_label

## Detailed Description

An ActionLabel is an SSWF addition which is not saved in the SWF movie. It is used to indicate where a BranchAction can branch.

## Constructor & Destructor Documentation

ActionLabel::ActionLabel | ( | TagBase * | tag | ) |

An action label is set to "no name" by default. You are expected to call SetLabel() once initialized.

Parameters:

  `[in]` | tag | The tag including this action

References f_label.

Referenced by Duplicate().

## Member Function Documentation

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

This function creates a new label action and copies the label of 'this' action.

Returns:
  The pointer to the new ActionLabel

Reimplemented from sswf::Action.

References ActionLabel(), f_label, SetLabel(), and sswf::Action::Tag().

ActionLabel::GetLabel | ( | void |  | ) | const`[inline]`

This function retrieves the name of this label. It is used to search all the labels in an array of actions.

Returns:
  The name of this label

References f_label.

Referenced by sswf::Action::FindLabel(), and sswf::ActionBranch::Parse2ndPass().

void ActionLabel::SetLabel | ( | const char * | label | ) |

This function defines the name of an ActionLabel. The name can be any valid string. It should not be empty.

Parameters:

  `[in]` | label | The new label name

References f_label, sswf::MemoryManager::MemFree(), and sswf::MemoryManager::StrDup().

Referenced by Duplicate(), and sswf::Action::FindLabelAtOffset().

## Member Data Documentation

char* sswf::ActionLabel::f_label`[private]`

Referenced by ActionLabel(), Duplicate(), GetLabel(), and SetLabel().

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

- libsswf.h
- libsswf_actions.c++