Example #1
0
void Float::load(PersistentStore &store)
{
	if (store.currentNodeType() != typeName())
		throw ModelException("Trying to load a Float node from an incompatible node type " + store.currentNodeType());

	set(store.loadDoubleValue());
}
Example #2
0
void Integer::load(PersistentStore &store)
{
	if (store.currentNodeType() != typeName())
		throw ModelException("Trying to load an Integer node from an incompatible node type " + store.currentNodeType());

	set(store.loadIntValue());
}
Example #3
0
void Boolean::load(PersistentStore &store)
{
	if (store.currentNodeType() != typeName())
		throw ModelException("Trying to load an Boolean node from an incompatible node type " + store.currentNodeType());

	bool val = store.loadIntValue();
	set(val);
}
Example #4
0
void Character::load(PersistentStore &store)
{
	if (store.currentNodeType() != typeName())
		throw ModelException("Trying to load a Character node from an incompatible node type " + store.currentNodeType());

	QString t = store.loadStringValue();
	if (t.size() != 1) throw ModelException("Loading character node failed. Invalid persistent store data: " + t);

	set(t[0]);
}