|
Horizon
|
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool. More...
#include <pool.hpp>
Public Member Functions | |
| Pool (const std::string &base_path, bool read_only=true) | |
| Constructs a Pool. More... | |
| const class Unit * | get_unit (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const class Entity * | get_entity (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const class Symbol * | get_symbol (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const class Padstack * | get_padstack (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const class Padstack * | get_well_known_padstack (const std::string &name, UUID *pool_uuid_out=nullptr) |
| const class Package * | get_package (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const class Part * | get_part (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const class Frame * | get_frame (const UUID &uu, UUID *pool_uuid_out=nullptr) |
| std::set< UUID > | get_alternate_packages (const UUID &uu) |
| virtual std::string | get_model_filename (const UUID &pkg_uuid, const UUID &model_uuid) |
| virtual std::string | get_filename (ObjectType type, const UUID &uu, UUID *pool_uuid_out=nullptr) |
| const std::string & | get_base_path () const |
| void | clear () |
| Clears all lazy-loaded objects. More... | |
| std::string | get_tmp_filename (ObjectType type, const UUID &uu) const |
Static Public Member Functions | |
| static int | get_required_schema_version () |
Public Attributes | |
| SQLite::Database | db |
| The database connection. More... | |
Protected Member Functions | |
| std::string | get_flat_filename (ObjectType type, const UUID &uu) const |
| void | get_pool_uuid (ObjectType type, const UUID &uu, UUID *pool_uuid_out) |
Protected Attributes | |
| std::string | base_path |
| std::map< UUID, Unit > | units |
| std::map< UUID, Entity > | entities |
| std::map< UUID, Symbol > | symbols |
| std::map< UUID, Padstack > | padstacks |
| std::map< UUID, Package > | packages |
| std::map< UUID, Part > | parts |
| std::map< UUID, Frame > | frames |
| std::map< std::pair< ObjectType, UUID >, UUID > | pool_uuid_cache |
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Objects are lazy-loaded when they're accessed for the first time.
| horizon::Pool::Pool | ( | const std::string & | base_path, |
| bool | read_only = true |
||
| ) |
Constructs a Pool.
| base_path | Path to the pool containing the pool.db |
| void horizon::Pool::clear | ( | ) |
Clears all lazy-loaded objects.
Doing so will invalidate all references pointers by get_entity and friends.
| SQLite::Database horizon::Pool::db |
The database connection.
You may use it to perform more advanced queries on the pool.
1.8.17