Harmonic Flow Framework (libhffwk)
Cross platform C++ 2D Game Engine Framework
Public Member Functions | List of all members
HFCore::PersistenceLayer Class Referenceabstract

Interface for PersistenceLayer base class. More...

#include <PersistenceLayer.h>

Inheritance diagram for HFCore::PersistenceLayer:
Inheritance graph
[legend]

Public Member Functions

 PersistenceLayer ()
 Constructor.
 
virtual ~PersistenceLayer ()
 Destructor.
 
virtual void putString (const std::string &name, const std::string &value, bool persist=false)=0
 Put string name / value pair into map. More...
 
virtual const std::string getString (const std::string &name)=0
 Get string value for given name. More...
 
virtual bool remove (const std::string &name, bool persist=false)=0
 Remove name / value pair from map for given name. More...
 
virtual int32_hf getKeyCount ()=0
 Get the size of name / value pair map. More...
 
virtual const std::string getKey (int32_hf i)=0
 Get index name of map for given index. More...
 
virtual void persist ()=0
 Persist / save name / value pair map to disk.
 

Detailed Description

Interface for PersistenceLayer base class.

Definition at line 38 of file PersistenceLayer.h.

Member Function Documentation

◆ getKey()

virtual const std::string HFCore::PersistenceLayer::getKey ( int32_hf  i)
pure virtual

Get index name of map for given index.

Parameters
iIndex to lookup.
Returns
Index name of map for given index.

Implemented in HFCore::GenericPersistenceLayer.

◆ getKeyCount()

virtual int32_hf HFCore::PersistenceLayer::getKeyCount ( )
pure virtual

Get the size of name / value pair map.

Returns
Size of name / value pair map.

Implemented in HFCore::GenericPersistenceLayer.

◆ getString()

virtual const std::string HFCore::PersistenceLayer::getString ( const std::string &  name)
pure virtual

Get string value for given name.

Parameters
nameName.
Returns
Value for given name.

Implemented in HFCore::GenericPersistenceLayer.

◆ putString()

virtual void HFCore::PersistenceLayer::putString ( const std::string &  name,
const std::string &  value,
bool  persist = false 
)
pure virtual

Put string name / value pair into map.

Parameters
nameName.
valueValue.
persisttrue to persist / save to disk.

Implemented in HFCore::GenericPersistenceLayer.

◆ remove()

virtual bool HFCore::PersistenceLayer::remove ( const std::string &  name,
bool  persist = false 
)
pure virtual

Remove name / value pair from map for given name.

Parameters
nameName.
persisttrue to persist / save to disk.
Returns
true if value removed, else false.

Implemented in HFCore::GenericPersistenceLayer.


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