what I want to archive is an easy way to make some variables permanent. To do this, I wrote the PeristenceProvider class, which wraps the functionality of the boost property tree for storing data in xml / ini files.
At the moment, I need to do such things:
ClassA::ClassA() { m_valueI = PersistenceProvider::getInstance.get<int>("valueI"); } ClassA::~ClassA() { PeristenceProvider::getInstance.set<int>("valueI", m_valueI); }
But is there any way to hide it as follows:
class ClassA { Persist<int, "valueI"> m_ValueI; }
Steve source share