Gnash  0.8.11dev
Public Types | Public Member Functions | Friends | List of all members
gnash::CharacterDictionary Class Reference

The Characters dictionary associated with each SWF file. More...

#include <SWFMovieDefinition.h>

Public Types

typedef std::map< int, boost::intrusive_ptr< SWF::DefinitionTag > > CharacterContainer
 The container used by this dictionary. More...
 
typedef CharacterContainer::iterator CharacterIterator
 
typedef CharacterContainer::const_iterator CharacterConstIterator
 

Public Member Functions

boost::intrusive_ptr< SWF::DefinitionTaggetDisplayObject (int id) const
 Get the Character with the given id. More...
 
DSOTEXPORT void addDisplayObject (int id, boost::intrusive_ptr< SWF::DefinitionTag > c)
 Add a Character assigning it the given id. More...
 
CharacterIterator begin ()
 Return an iterator to the first dictionary element. More...
 
CharacterConstIterator begin () const
 Return a const_iterator to the first dictionary element. More...
 
CharacterIterator end ()
 Return an iterator to one-past last dictionary element. More...
 
CharacterConstIterator end () const
 Return a const_iterator to one-past last dictionary element. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const CharacterDictionary &cd)
 

Detailed Description

The Characters dictionary associated with each SWF file.

This is a set of Characters defined by define tags and getting assigned a unique ID.

Member Typedef Documentation

§ CharacterConstIterator

typedef CharacterContainer::const_iterator gnash::CharacterDictionary::CharacterConstIterator

§ CharacterContainer

typedef std::map<int, boost::intrusive_ptr<SWF::DefinitionTag> > gnash::CharacterDictionary::CharacterContainer

The container used by this dictionary.

It contains pairs of 'int' and 'boost::intrusive_ptr<DefinitionTag>'

§ CharacterIterator

typedef CharacterContainer::iterator gnash::CharacterDictionary::CharacterIterator

Member Function Documentation

§ addDisplayObject()

void gnash::CharacterDictionary::addDisplayObject ( int  id,
boost::intrusive_ptr< SWF::DefinitionTag c 
)

Add a Character assigning it the given id.

replaces any existing DisplayObject with the same id

References gnash::key::c, and gnash::SWF::DefinitionTag::id().

Referenced by gnash::SWFMovieDefinition::addDisplayObject().

§ begin() [1/2]

CharacterIterator gnash::CharacterDictionary::begin ( )
inline

Return an iterator to the first dictionary element.

§ begin() [2/2]

CharacterConstIterator gnash::CharacterDictionary::begin ( ) const
inline

Return a const_iterator to the first dictionary element.

§ end() [1/2]

CharacterIterator gnash::CharacterDictionary::end ( )
inline

Return an iterator to one-past last dictionary element.

§ end() [2/2]

CharacterConstIterator gnash::CharacterDictionary::end ( ) const
inline

Return a const_iterator to one-past last dictionary element.

References gnash::key::o, and gnash::operator<<().

§ getDisplayObject()

boost::intrusive_ptr< SWF::DefinitionTag > gnash::CharacterDictionary::getDisplayObject ( int  id) const

Get the Character with the given id.

returns a NULL if the id is unknown.

References _, IF_VERBOSE_PARSE, and gnash::log_parse().

Referenced by gnash::SWFMovieDefinition::getDefinitionTag().

Friends And Related Function Documentation

§ operator<<

std::ostream& operator<< ( std::ostream &  o,
const CharacterDictionary cd 
)
friend

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