EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoArchive.h
Go to the documentation of this file.
1 /******************************************************************************
2  DISCLAIMER
3 
4  THIS SOFTWARE PRODUCT ("SOFTWARE") IS PROPRIETARY TO ENOCEAN GMBH, OBERHACHING,
5  GERMANY (THE "OWNER") AND IS PROTECTED BY COPYRIGHT AND INTERNATIONAL TREATIES OR
6  PROTECTED AS TRADE SECRET OR AS OTHER INTELLECTUAL PROPERTY RIGHT. ALL RIGHTS, TITLE AND
7  INTEREST IN AND TO THE SOFTWARE, INCLUDING ANY COPYRIGHT, TRADE SECRET OR ANY OTHER
8  INTELLECTUAL PROPERTY EMBODIED IN THE SOFTWARE, AND ANY RIGHTS TO REPRODUCE,
9  DISTRIBUTE, MODIFY, DISPLAY OR OTHERWISE USE THE SOFTWARE SHALL EXCLUSIVELY VEST IN THE
10  OWNER. ANY UNAUTHORIZED REPRODUCTION, DISTRIBUTION, MODIFICATION, DISPLAY OR OTHER
11  USE OF THE SOFTWARE WITHOUT THE EXPLICIT PERMISSION OF OWNER IS PROHIBITED AND WILL
12  CONSTITUTE AN INFRINGEMENT OF THE OWNER'S RIGHT AND MAY BE SUBJECT TO CIVIL OR
13  CRIMINAL SANCTION.
14 
15  THIS SOFTWARE IS PROVIDED BY THE OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN PARTICULAR, THE OWNER DOES NOT WARRANT
18  THAT THE SOFTWARE SHALL BE ERROR FREE AND WORKS WITHOUT INTERRUPTION.
19 
20  IN NO EVENT SHALL THE OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  ******************************************************************************/
27 
33 #ifndef _EOARCHIVE_H_
34 #define _EOARCHIVE_H_
35 #include "eoHalTypes.h"
36 #include "eoISerialize.h"
37 #include "eoHeader.h"
38 
46 class eoArchive
47 {
48 
49 public:
50  eoArchive();
51 
52  virtual ~eoArchive();
57  virtual eoArchive& operator &(char *obj);
62  virtual eoArchive& operator &(char const *obj);
67  virtual eoArchive& operator &(uint32_t &obj);
72  virtual eoArchive& operator &(int32_t &obj);
77  virtual eoArchive& operator &(uint16_t &obj);
82  virtual eoArchive& operator &(int16_t &obj);
87  virtual eoArchive& operator &(uint8_t &obj);
92  virtual eoArchive& operator &(int8_t &obj);
97  virtual eoArchive& operator &(double& obj);
102  virtual eoArchive& operator &(bool &obj);
107  virtual eoArchive& operator &(eoISerialize *obj);
112  virtual eoArchive& operator &(eoISerialize &obj);
118  virtual uint8_t Open(const char * strBuf);
122  virtual void Close();
123 
128  virtual void startBlock(const char* BlockName);
129 
133  virtual void indent();
137  virtual void startBlock();
141  virtual void endBlock();
142 
144  bool isStoring;
146  char identifier[32];
147 protected:
151  uint8_t level;
153  uint8_t state;
155  bool isName;
156 
157 private:
158  //debug
159 };
163 #endif // !defined(EA_8062E719_2E73_4ad7_9D7D_AA6996E0FCB1__INCLUDED_)
uint8_t state
Statemaschine indicator.
Definition: eoArchive.h:153
virtual void Close()
Interface for storing.
Definition: eoISerialize.h:48
char identifier[32]
String indentifier of the archive.
Definition: eoArchive.h:146
virtual void startBlock()
virtual void endBlock()
virtual eoArchive & operator&(char *obj)
bool isStoring
Flag signalising storing.
Definition: eoArchive.h:144
uint8_t level
Actual level of the serialisation stream.
Definition: eoArchive.h:151
virtual void indent()
bool isName
Flag to signalise if name set.
Definition: eoArchive.h:155
virtual uint8_t Open(const char *strBuf)
Helper Class for the Serializations, sets the Archive Header.
Definition: eoHeader.h:42
the base Archive
Definition: eoArchive.h:46
eoHeader * h
Header information with the versioning.
Definition: eoArchive.h:149