Scaleform::GFx::State
class State : public RefCountBase<State, Stat_Default_Mem>;
State is a base class for all state objects that can be set on the loader and movie instances. States provide configuration settings and overridable interfaces for tasks such as file IO, image creation and font sources. Pointers to states can be obtained and modified through the StateBag::GetStateAddRef and StateBag::SetState functions, respectively. States can be applied to Loader, MovieDef and Movie since they derive from StateBag. When looking up a needed state, GFx always searches the set of states set on the Movie first. If the state is not found, it proceeds back to search states associated with MovieDef and then finally Loader. This means that a state set on Movie will only apply to that movie instance, while states set on the loader will apply to all movies and instances unless explicitly reassigned there.
In addition to state-type independent accessor functions, StateBag also includes state-type specific inlines to make state access more convenient. The Log state, for example, is usually accessed through the StateBag::GetLog and StateBag::SetLog functions that delegate to GetStateAddRef and SetState.
State types are divided into two groups; binding and non-binding. Non-binding states, such as Log, FSCommandHandler and Translator, can be changed dynamically with a change taking effect immediately. Binding states apply to the movie during the CreateMovie call and are referenced by that movie permanently until the created MovieDef is released. States that affect loading are usually binding, including FileOpener and ImageCreator. Changing the binding state will affect all of the movies loaded from that point on, but not the movies that were loaded with the older set of states.
State derives from RefCountBase, which provides reference counting support for the Ptr reference counted pointer. The reference counting is thread safe.
Enumeration |
Description |
An enumeration type defining the type of a State object, such as State_RenderConfig, State_FSCommandHandler, State_Log, etc. Only one State object of each type can be set on the loader or a movie. |
Method |
Description |
Obtains the StateType of this state. | |
State constructor, only invoked from derived classes. |
GFx_Loader.h