EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoStorageManager Class Reference

handles the Storage of Object More...

#include <eoStorageManager.h>

Public Member Functions

 eoStorageManager ()
 
 eoStorageManager (eoArchive &archive)
 
eoReturn addObject (const char *name, eoISerialize *object)
 Adds an eoISerialize Object to the storageManager. More...
 
eoReturn RemoveObject (const char *name)
 Removes an ISerialize Object from the StorageManager. More...
 
eoReturn Load (const char *strBuf)
 
eoReturn Save (const char *strBuf)
 

Detailed Description

handles the Storage of Object

Manages for you the saving or loading of ISerialize objects, which you can add via addObject or loadObject

eoStorageManager myManager;
myManager.Add(myGateway);
myManager.Save("mySaveFile");
Examples:
storage_example.cpp, tutorial1.cpp, tutorial2.cpp, tutorial3.cpp, and WatcherMain.cpp.

Constructor & Destructor Documentation

◆ eoStorageManager() [1/2]

eoStorageManager::eoStorageManager ( )

The standard constructor uses the eoArchiveTXT

◆ eoStorageManager() [2/2]

eoStorageManager::eoStorageManager ( eoArchive archive)

The Storage Manager Constructor

Parameters
archiveeoArchive Format to save to.

Member Function Documentation

◆ addObject()

eoReturn eoStorageManager::addObject ( const char *  name,
eoISerialize object 
)

Adds an eoISerialize Object to the storageManager.

all Objects which have been added to the storageManager, will be handled in the save and load functionality of the Storage Manager.

Parameters
nameThe object identifier used in your Application to load/save the ISerialize object (maximal 32 characters)
objectan ISerialize object which you want to save or load
Returns
eoReturn
Examples:
storage_example.cpp, tutorial1.cpp, tutorial2.cpp, and tutorial3.cpp.

◆ Load()

eoReturn eoStorageManager::Load ( const char *  strBuf)

Loads from the specified stream allObjects

Parameters
strBuf
Returns
eoReturn
Examples:
storage_example.cpp, tutorial2.cpp, and tutorial3.cpp.

◆ RemoveObject()

eoReturn eoStorageManager::RemoveObject ( const char *  name)

Removes an ISerialize Object from the StorageManager.

The eoISerialize object will be removed from the StorageManager handling

Parameters
nameThe object identifier used in your Application to load/save the ISerialize object (maximal 32 characters)
Returns
eoReturn

◆ Save()

eoReturn eoStorageManager::Save ( const char *  strBuf)

Saves your object to the specified Buffer

Parameters
strBufthe Buffer to save to, using the choosen Archive type
Returns
eoReturn
Examples:
storage_example.cpp, and tutorial1.cpp.