update sqlitecpp & merge property settings into properties
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
ff9bf0c14a
commit
88ca7769d1
39 changed files with 412 additions and 253 deletions
49
src/persistence/project.cpp
Normal file
49
src/persistence/project.cpp
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#include "project.hpp"
|
||||
|
||||
#include "ikarus/persistence/project.h"
|
||||
|
||||
#include <persistence/function_context.hpp>
|
||||
|
||||
auto IkarusProject::get_name() const -> std::string_view {
|
||||
return _name;
|
||||
}
|
||||
|
||||
auto IkarusProject::get_path() const -> std::filesystem::path const& {
|
||||
return _path;
|
||||
}
|
||||
|
||||
auto IkarusProject::get_db() -> sqlitecpp::Connection * {
|
||||
return _db.get();
|
||||
}
|
||||
|
||||
auto IkarusProject::get_db() const -> sqlitecpp::Connection const * {
|
||||
return _db.get();
|
||||
}
|
||||
|
||||
auto IkarusProject::get_function_context() -> FunctionContext * {
|
||||
return &_function_contexts.emplace(this);
|
||||
}
|
||||
|
||||
IkarusBlueprint * IkarusProject::get_blueprint(IkarusId id) {
|
||||
return get_cached_object(id, this->_blueprints);
|
||||
}
|
||||
|
||||
auto IkarusProject::uncache_blueprint(IkarusBlueprint * blueprint) -> void {
|
||||
remove_cached_object(blueprint, _blueprints);
|
||||
}
|
||||
|
||||
auto IkarusProject::get_entity(IkarusId id) -> IkarusEntity * {
|
||||
return get_cached_object(id, this->_entities);
|
||||
}
|
||||
|
||||
auto IkarusProject::uncache_entity(IkarusEntity * entity) -> void {
|
||||
remove_cached_object(entity, _entities);
|
||||
}
|
||||
|
||||
auto IkarusProject::get_property(IkarusId id) -> IkarusProperty * {
|
||||
return get_cached_object(id, this->_properties);
|
||||
}
|
||||
|
||||
auto IkarusProject::uncache_property(IkarusProperty * property) -> void {
|
||||
remove_cached_object(property, _properties);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue