The interface for serializable objects.
Customizable objects could contain other serializable objects as its members or children. For example, a form's customizationState could contain several customizationState of the controls it contains.
Public Member Functions |
|
ICustomizationState | SaveState () |
This method should save all the states of an
object. |
|
bool | LoadState (ICustomizationState stateToLoad) |
This method should restore all the states of
an object. |
ICustomizationState MaxCustomControls::ISerializable::SaveState | ( | ) |
This method should save all the states of an object.
Since an ISerializable objects could contain other ISerializable "children", when saving the states, it could call each of the "children"'s SaveState and then adds the returned ICustomizationState objects to the "CustomizationStates" list of the current ISerializable object's state object.
Client should assign a unique name for each of its child state objects. And use these unique names during LoadState to get the proper child state objects.
Implemented in MaxCustomControls::BaseMaterialControls::RichMaterialExplorerControl, MaxCustomControls::ExplorerControl, MaxCustomControls::MaterialBrowserControls::BaseMaterialBrowserContainer, MaxCustomControls::MaterialBrowserControls::RichMaterialBrowserControl, MaxCustomControls::MaterialExplorerControls::MaterialExplorerDialog, MaxCustomControls::MaterialExplorerControls::SceneMaterialExplorerControl, MaxCustomControls::MaterialExplorerControls::SelectedMaterialExplorerControl, MaxCustomControls::MaxForm, and MaxCustomControls::SceneExplorerControls::RichSceneExplorerControl.
bool MaxCustomControls::ISerializable::LoadState | ( | ICustomizationState | stateToLoad | ) |
This method should restore all the states of an object.
Since an ISerializable objects could contain other ISerializable "children", when loading the states, it could call each of the "children"'s LoadState and pass the corresponding CustomizationState objects in the "CustomizationStates" List.
Client should assign a unique name for each of its child state objects. And use these unique names during LoadState to get the proper child state objects.
stateToLoad | An object deriving from ICustomizationState interface. |
Implemented in MaxCustomControls::BaseMaterialControls::RichMaterialExplorerControl, MaxCustomControls::ExplorerControl, MaxCustomControls::MaterialBrowserControls::BaseMaterialBrowserContainer, MaxCustomControls::MaterialBrowserControls::RichMaterialBrowserControl, MaxCustomControls::MaterialExplorerControls::MaterialExplorerDialog, MaxCustomControls::MaterialExplorerControls::SceneMaterialExplorerControl, MaxCustomControls::MaterialExplorerControls::SelectedMaterialExplorerControl, MaxCustomControls::MaxForm, and MaxCustomControls::SceneExplorerControls::RichSceneExplorerControl.