Guiliani  Version 2.4 revision 5970 (build 3)
CGUIStreamableObject Class Reference

Base class for streamable objects. More...

#include <GUIStreamableObject.h>

Inheritance diagram for CGUIStreamableObject:

Public Member Functions

const eC_String & GetXMLTag () const
 
virtual void ReadFromStream ()
 
void SetXMLTag (const eC_String &kXMLTag)
 
virtual void WriteToStream (const eC_Bool bWriteClassID=false)
 

Static Public Attributes

static const eC_Char XMLTAG_CLASSVERSION [] = "ClassVersion"
 

Protected Member Functions

eC_UInt ReadStreamingHeader (const eC_UInt &uiClassVersion, const eC_UInt &uiClassMinVersion=0) const
 
void WriteStreamingFooter (const eC_Bool &bWriteClassID) const
 
void WriteStreamingHeader (const eC_Bool &bWriteClassID, const eC_Char *const pkClassIDTag, const eC_Int &iClassID, const eC_UInt &uiClassVersion) const
 

Detailed Description

Base class for streamable objects.

This class declares a generic interface which is used for Guiliani's streaming mechanism (see Streaming). Any object which is to be constructed via streaming has to be derived from this class. Derived classes implement the ReadFromStream and WriteToStream in such a way that they read/write all of the object's attributes from/to the data stream. When implementing the read/write methods take special care to the order in which the attributes are read/written, as this has to be identical in both methods.

Member Function Documentation

◆ GetXMLTag()

const eC_String& CGUIStreamableObject::GetXMLTag ( ) const
inline

Returns the XML tag which is used by the WriteToStream() method as leading and trailing tag.

Returns
The XML tag

◆ ReadFromStream()

virtual void CGUIStreamableObject::ReadFromStream ( )
inlinevirtual

Reads attributes from the streaming file. Only for use with GUIFactoryManager.

See also
CGUIObject::ReadFromStream()

Reimplemented in CGUIObject, CGUIChart, CGUIText, CGUIComboBox, CGUIRichText, CGUIClock, CGUIMultiLineEdit, CGUIEditableText, CGUIListBox, CGUIBaseInputField, CGUIProgressBar, CGUIRange, CGUIEdit, CGUIWheel, CGUITabContainer, CGUIGraph, CGUIScrollView, CGUIKeyboard, CGUIValue, CGUIAbstractBar, CGUICarousel, CGUITableView, CGUIPlot, CGUIAnimation, CGUIImageStack, CGUIKnob, CGUIIconButton, CGUIBaseTextField, CGUIMenuBar, CGUIAnimationChain, CGUIGauge, CGUIScrollingText, CGUIPrimitiveButton, CGUIAnimatedImage, CGUIWheelContainer, CGUITouchScrollView, CGUICircularSlider, CGUITabItem, CGUIButton, CGUICommand, CGUIExpandingComposite, CGUICompositeBehaviour, CGUIMenuItem, CGUITextField, CGUIBaseCheckBox, CGUIScrollBar, CGUIListItem, CGUICenterFocusContainer, CGUISegmentBar, CGUIScrollingTextField, CGUIHotkeysBehaviour, CGUIBaseMessageBox, CGUITransitionCmd, CGUIGroupContainer, CGUIBaseButton, CGUIAnimationStdGUIObject, CGUISingleCmdBehaviour, CGUISlider, CGUILayouterAnchor, CGUIRadioButtonGroup, CGUIBaseSlider, CGUICheckBox, CGUIInputField, CGUIRadialBar, CGUIVideo, CGUIImage, CGUIBlendButton, CGUIRepositionCompositeObject, CGUIFragmentContainer, CGUIPageContainer, CGUILayerContainer, CGUICompositeObject, CGUIAnimationMove, CGUIMenu, CGUIAnimationMoveInOut, CGUIRangeSlider, CGUIBaseRadioButton, CGUIRadioButton, CGUIRadialSlider, CGUITabClientArea, CGUIGeometryObject, CGUIRadialProgressBar, CGUIComboBoxHeader, CGUIAnimationSize, CGUILayouterAlignToParent, CGUIMenuItemSeparator, CGUILayouterGrid, CGUIAnimationAttribute, CGUILayouterPercentage, CGUITextContainer, CGUIAnimationBlinking, CGUIMenuBase, CGUILayouterReposition, CGUISetObjectVisualsCmd, CGUICalendar, CGUILayouterList, CGUISplitContainer, CGUIAnimationTrigger, CGUILoadDialogCmd, CGUIAutoRepeatBehaviour, CGUIObjectVisualsBehaviour, CGUILoadAnimationsCmd, CGUIMultiCmdBehaviour, CGUIObjectStateBehaviour, CGUISetObjectStateCmd, CGUIGroupLayouter, CGUISetDataPoolCmd, CGUIPlaybackSoundCmd, CGUIKeyboardBehaviour, CGUIStopAnimationChainCmd, CGUITabSwitchBehaviour, CGUICallAPICmd, CGUIStartAnimationChainCmd, CGUIDelayCmd, CGUISwitchResourceSetsCmd, and CGUIQuitCmd.

◆ ReadStreamingHeader()

eC_UInt CGUIStreamableObject::ReadStreamingHeader ( const eC_UInt &  uiClassVersion,
const eC_UInt &  uiClassMinVersion = 0 
) const
protected

Reads the typical streaming header. This should always be the first thing to call within ReadFromStream()

Exceptions
CGUIStreamingExceptionIn case the read class version is larger than the version of the class for which the library was built.
CGUIStreamingExceptionin case the read class version is lesser than the minimal version allowed.
Parameters
uiClassVersionThe current version number of the class.
uiClassMinVersionThe minimal allowed version number of the class. If not set (== 0), it will not be evaluated.
Returns
Class Version number as read from the stream

◆ SetXMLTag()

void CGUIStreamableObject::SetXMLTag ( const eC_String &  kXMLTag)
inline

Sets an XML tag which is used by the WriteToStream() method as leading and trailing tag.

Parameters
kXMLTagXML tag

◆ WriteStreamingFooter()

void CGUIStreamableObject::WriteStreamingFooter ( const eC_Bool &  bWriteClassID) const
protected

Writes the typical streaming footer, including the closing XMLTag. This should always be the last thing to call within WriteToStream()

Parameters
bWriteClassIDHand over the parameter as received within WriteToStream()

◆ WriteStreamingHeader()

void CGUIStreamableObject::WriteStreamingHeader ( const eC_Bool &  bWriteClassID,
const eC_Char *const  pkClassIDTag,
const eC_Int &  iClassID,
const eC_UInt &  uiClassVersion 
) const
protected

Writes the typical streaming header including XMLTag, ClassID and ClassVersion . This should always be the first thing to call within WriteToStream()

Parameters
bWriteClassIDHand over the parameter as received within WriteToStream()
pkClassIDTagThe ClassIDTag which shall encapsulate the ClassID value. (E.g. XMLTAG_CONTROLCLASSID for controls or XMLTAG_COMMANDCLASSID for commands)
iClassIDThe unique Class ID which is used by the streaming factory to decide which object to instantiate
uiClassVersionThe version number of the class which shall be written to the stream

◆ WriteToStream()

virtual void CGUIStreamableObject::WriteToStream ( const eC_Bool  bWriteClassID = false)
inlinevirtual

Writes attributes to the streaming file. A CGUIStreamWriter has to be initialized.

Parameters
bWriteClassIDThis flag is used to switch writing of the class ID, leading and trailing tags. When implementing a new streamable object, check this flag. If it is true, first write the class ID, then continue with this object's attributes, and finally call the base class implementation with this flag set to false (this is the default).

Reimplemented in CGUIObject, CGUIChart, CGUIText, CGUIComboBox, CGUIRichText, CGUIClock, CGUIMultiLineEdit, CGUIEditableText, CGUIListBox, CGUIBaseInputField, CGUIProgressBar, CGUIRange, CGUIEdit, CGUIWheel, CGUITabContainer, CGUIGraph, CGUIScrollView, CGUIKeyboard, CGUIValue, CGUITableView, CGUIPlot, CGUIAbstractBar, CGUICarousel, CGUIAnimation, CGUIImageStack, CGUIKnob, CGUIIconButton, CGUIBaseTextField, CGUIAnimationChain, CGUIMenuBar, CGUIScrollingText, CGUIGauge, CGUIPrimitiveButton, CGUIWheelContainer, CGUIAnimatedImage, CGUITouchScrollView, CGUICircularSlider, CGUITabItem, CGUIButton, CGUIExpandingComposite, CGUICompositeBehaviour, CGUIMenuItem, CGUITextField, CGUICommand, CGUIBaseCheckBox, CGUIScrollBar, CGUISegmentBar, CGUIListItem, CGUIScrollingTextField, CGUICenterFocusContainer, CGUIBaseMessageBox, CGUIHotkeysBehaviour, CGUITransitionCmd, CGUIGroupContainer, CGUIAnimationStdGUIObject, CGUIBaseButton, CGUISingleCmdBehaviour, CGUILayouterAnchor, CGUIRadioButtonGroup, CGUISlider, CGUICheckBox, CGUIBaseSlider, CGUIInputField, CGUIRadialBar, CGUIVideo, CGUIImage, CGUIBlendButton, CGUIRepositionCompositeObject, CGUIFragmentContainer, CGUIPageContainer, CGUILayerContainer, CGUIAnimationMove, CGUICompositeObject, CGUIMenu, CGUIRangeSlider, CGUIAnimationMoveInOut, CGUIBaseRadioButton, CGUIRadioButton, CGUIRadialSlider, CGUITabClientArea, CGUIGeometryObject, CGUIRadialProgressBar, CGUIComboBoxHeader, CGUIAnimationSize, CGUILayouterAlignToParent, CGUIMenuItemSeparator, CGUILayouterGrid, CGUIAnimationAttribute, CGUILayouterPercentage, CGUITextContainer, CGUIAnimationBlinking, CGUISetObjectVisualsCmd, CGUIMenuBase, CGUILayouterReposition, CGUICalendar, CGUILayouterList, CGUISplitContainer, CGUIAnimationTrigger, CGUIAutoRepeatBehaviour, CGUILoadDialogCmd, CGUIObjectVisualsBehaviour, CGUILoadAnimationsCmd, CGUIObjectStateBehaviour, CGUISetObjectStateCmd, CGUISetDataPoolCmd, CGUIMultiCmdBehaviour, CGUIGroupLayouter, CGUITabSwitchBehaviour, CGUICallAPICmd, CGUIPlaybackSoundCmd, CGUIKeyboardBehaviour, CGUIStopAnimationChainCmd, CGUIStartAnimationChainCmd, CGUIDelayCmd, CGUISwitchResourceSetsCmd, and CGUIQuitCmd.

Member Data Documentation

◆ XMLTAG_CLASSVERSION

const eC_Char CGUIStreamableObject::XMLTAG_CLASSVERSION = "ClassVersion"
static

XML tag to be used when writing the class version into a stream.


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