Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIStreamableObject.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUISTREAMABLEOBJECT__H_
11#define GUISTREAMABLEOBJECT__H_
12
13#include "eC_Types.h"
14
15#ifdef GUILIANI_WRITE_GUI
16#include "eC_String.h"
17#endif
18
23#ifndef GUILIANI_WRITE_GUI
24 #define SetXMLTag(a) SetXMLTag()
25#endif
26
29
31
45{
46public:
47 virtual ~CGUIStreamableObject() {}
48
49#if defined(GUILIANI_STREAM_GUI) || defined(GUILIANI_WRITE_GUI)
52 static const eC_Char XMLTAG_CLASSVERSION[];
53#endif
54
55#if defined(GUILIANI_STREAM_GUI)
61 virtual void ReadFromStream() {}
62#endif
63
64#if defined(GUILIANI_WRITE_GUI)
75 virtual void WriteToStream(const eC_Bool bWriteClassID = false) {}
76#endif
82 void SetXMLTag(const eC_String& kXMLTag)
83 {
84#if defined(GUILIANI_WRITE_GUI)
85 m_kXMLTag = kXMLTag;
86#endif
87 }
88
89#if defined(GUILIANI_WRITE_GUI)
95 const eC_String& GetXMLTag() const {return m_kXMLTag;}
96#endif
97
98protected:
99
100#if defined(GUILIANI_STREAM_GUI)
108 eC_UInt ReadStreamingHeader(const eC_UInt& uiClassVersion, const eC_UInt& uiClassMinVersion = 0) const;
109#endif
110
111#if defined(GUILIANI_WRITE_GUI)
119 void WriteStreamingHeader(const eC_Bool& bWriteClassID, const eC_Char* const pkClassIDTag, const eC_Int& iClassID, const eC_UInt& uiClassVersion) const;
120
125 void WriteStreamingFooter(const eC_Bool& bWriteClassID) const;
126
127private:
128 eC_String m_kXMLTag;
129#endif
130};
131
132#endif
Base class for streamable objects.
Definition: GUIStreamableObject.h:45
void WriteStreamingFooter(const eC_Bool &bWriteClassID) const
const eC_String & GetXMLTag() const
Definition: GUIStreamableObject.h:95
void SetXMLTag(const eC_String &kXMLTag)
Definition: GUIStreamableObject.h:82
virtual void ReadFromStream()
Definition: GUIStreamableObject.h:61
void WriteStreamingHeader(const eC_Bool &bWriteClassID, const eC_Char *const pkClassIDTag, const eC_Int &iClassID, const eC_UInt &uiClassVersion) const
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
Definition: GUIStreamableObject.h:75
static const eC_Char XMLTAG_CLASSVERSION[]
Definition: GUIStreamableObject.h:52
eC_UInt ReadStreamingHeader(const eC_UInt &uiClassVersion, const eC_UInt &uiClassMinVersion=0) const