Mercurial > malikania
comparison STYLE_CPP.md @ 159:7362fba6ff11
Server: separate database access from model objects, #760 @4h
For a cleaner object usage regarding model access, we now use plain objects
instead of smart pointers of polymorphic objects.
For example, account, character and spell class are static objects which have a
reference to the real database backend, therefore each time a function requires
database access, it is forwarded to the appropriate database functions using
account_dao, character_dao and spell_dao.
To avoid user destroying the data by itself, the model::set_id function is only
available if MALIKANIA_PRIVATE macro is defined, thus database backends have
access but usually not the user code.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 03 Mar 2018 17:34:12 +0100 |
parents | 835c8ee3f9e5 |
children |
comparison
equal
deleted
inserted
replaced
158:4b292c20124c | 159:7362fba6ff11 |
---|