#include <libsswf.h>
Inheritance diagram for sswf::ActionDictionary:
Public Member Functions | |
ActionDictionary (TagBase *tag) | |
Initializes the dictionary. | |
void | AddString (const char *string) |
Add a string to a dictionary. | |
Private Member Functions | |
virtual Action * | Duplicate (void) const |
Duplicate a dictionary. | |
virtual ErrorManager::error_code_t | SaveData (Data &data, Data &nested_data) |
Save the dictionary strings. | |
Private Attributes | |
Vectors | f_strings |
Array of dictionary strings. | |
Classes | |
struct | string_t |
Holds one dictionary string. More... |
Note that too small a string will not benefit from being saved in a dictionary. Similarly, if the dictionary is used for only one string, it usually won't help.
Note that there should be only one single dictionary per Action list. The dictionary is visible through all the different blocks/level that an Action list represents. The consequences of saving more than one ActionDictionary in the same list are undefined.
ActionDictionary::ActionDictionary | ( | TagBase * | tag | ) |
Create an empty tag of type ACTION_DECLARE_DICTIONARY.
void ActionDictionary::AddString | ( | const char * | string | ) |
This function adds the specified string to the dictionary.
There is no limit to the string or the number of string one can add to a dictionary, except for the total size of an action block.
[in] | string | The string to append |
Action * ActionDictionary::Duplicate | ( | void | ) | const [private, virtual] |
This function creates a new ActionDictionary and then copy all the strings from 'this' dictionary to the new dictionary.
Reimplemented from sswf::Action.
ErrorManager::error_code_t ActionDictionary::SaveData | ( | Data & | data, | |
Data & | nested_data | |||
) | [private, virtual] |
This function is used to save the dictionary strings in the specified Data buffer.
[in] | data | The Data buffer where the strings are to be saved |
[in] | nested_data | The sub-actions of the dictionary (i.e. none) |
Reimplemented from sswf::Action.
Vectors sswf::ActionDictionary::f_strings [private] |