#include <user_info.h>
Classes | |
class | Mapped_UI |
class | SettingsResolver |
Static Public Member Functions | |
template<class T > | |
static T * | build (const Setting &element, const int index) |
Prototype of a UI builder. Return value is by the second argument since it type checking via dynamic_cast . | |
template<class T > | |
static T * | build (const Setting &element, const string &name) |
template<class T > | |
static void | get (T &instance, const Setting &element, const string &name) |
This methods tries to build a new double matrix. | |
template<class T > | |
static void | get (T &instance, const Setting &element, const int index) |
This methods tries to build a new double matrix. | |
template<class T > | |
static void | get (Array< T > &array_to_load, const Setting &element, const string &name) |
This methods tries to build a new double matrix. | |
template<class T > | |
static void | get (Array< T > &array_to_load, const Setting &element, const int index) |
This methods tries to build a new double matrix. | |
template<class T > | |
static void | save (const T *const instance, Setting &element, const string &name="") |
template<class T > | |
static void | save (const Array< T > &array_to_save, Setting &element, const string &name="") |
This methods tries to save a double vec. | |
static void | save (const mat &matrix, Setting &element, const string &name="") |
This methods tries to save a double matrix. | |
static void | save (const ivec &vec, Setting &element, const string &name="") |
This methods tries to save a double vec. | |
static void | save (const vec &vector, Setting &element, const string &name) |
This methods tries to save a double vector. | |
Protected Member Functions | |
UI (const string &class_name, const type_info *const class_type_info) | |
default constructor | |
virtual | ~UI () |
Virtual destructor for future use;. |
Firstly, you associate new RootElement instance with some filename during a time of its construtcion. Then, you save some object into the new RootElement instance, and save it into the file this way:
CAudi audi; RootElement root("cars.xml"); UserInfo::save( audi, root, "TT"); root.save();
In the other way round, when loading object from a XML file, the appropriate code looks like this:
RootElement root("cars.xml"); root.load(); UserInfo::build<T>(root,"TT");
UserInfo is an abstract is for internal purposes only. Use CompoundUserInfo<T> or Particular_UI<T> instead. The raison d'etre of this class is to allow pointers to its templated descendants.Also, the main functions of the whole UserInfo library are included within this class, see static methods 'build' and 'save'.
void bdm::UI::save | ( | const ivec & | vec, | |
Setting & | element, | |||
const string & | name = "" | |||
) | [static] |
This methods tries to save a double vec.
This methods tries to save a integer vector.