libikarus/src/persistence/project.cpp
Folling 7a7f7462a4
update sqlitecpp & merge property settings into properties
Signed-off-by: Folling <mail@folling.io>
2025-01-01 14:07:47 +01:00

49 lines
1.3 KiB
C++

#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);
}