Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
More...
#include <pool.hpp>
|
| Pool (const std::string &base_path, bool read_only=true) |
| Constructs a Pool.
|
|
const class Unit * | get_unit (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Entity * | get_entity (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Symbol * | get_symbol (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Padstack * | get_padstack (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Padstack * | get_well_known_padstack (const std::string &name, UUID *pool_uuid_out=nullptr) override |
|
const class Package * | get_package (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Part * | get_part (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Frame * | get_frame (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
const class Decal * | get_decal (const UUID &uu, UUID *pool_uuid_out=nullptr) override |
|
std::set< UUID > | get_alternate_packages (const UUID &uu) override |
|
std::string | get_model_filename (const UUID &pkg_uuid, const UUID &model_uuid) override |
|
virtual std::string | get_filename (ObjectType type, const UUID &uu, UUID *pool_uuid_out=nullptr) |
|
std::string | get_rel_filename (ObjectType type, const UUID &uu) |
|
const std::string & | get_base_path () const override |
|
bool | check_filename (ObjectType type, const std::string &filename, std::string *error_msg=nullptr) const override |
|
void | check_filename_throw (ObjectType type, const std::string &filename) const override |
|
SQLite::Database & | get_db () override |
|
class PoolParametric * | get_parametric () override |
|
const PoolInfo & | get_pool_info () const override |
|
void | clear () override |
| Clears all lazy-loaded objects.
|
|
std::string | get_tmp_filename (ObjectType type, const UUID &uu) const |
|
std::map< std::string, UUID > | get_actually_included_pools (bool include_self) override |
|
UUID | get_installation_uuid () |
|
ItemPoolInfo | get_pool_uuids (ObjectType ty, const UUID &uu) |
|
|
static int | get_required_schema_version () |
|
|
static const UUID | tmp_pool_uuid = "5e8d1bb6-7e61-4c59-9f01-1e1307069df0" |
|
static const std::map< ObjectType, std::string > | type_names |
|
|
std::string | get_flat_filename (ObjectType type, const UUID &uu) const |
|
void | get_pool_uuid (ObjectType type, const UUID &uu, UUID *pool_uuid_out) |
|
|
const std::string | base_path |
|
const PoolInfo | pool_info |
|
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< UUID, Decal > | decals |
|
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.
◆ Pool()
horizon::Pool::Pool |
( |
const std::string & |
base_path, |
|
|
bool |
read_only = true |
|
) |
| |
Constructs a Pool.
- Parameters
-
base_path | Path to the pool containing the pool.db |
◆ check_filename()
bool horizon::Pool::check_filename |
( |
ObjectType |
type, |
|
|
const std::string & |
filename, |
|
|
std::string * |
error_msg = nullptr |
|
) |
| const |
|
overridevirtual |
◆ check_filename_throw()
void horizon::Pool::check_filename_throw |
( |
ObjectType |
type, |
|
|
const std::string & |
filename |
|
) |
| const |
|
overridevirtual |
◆ clear()
void horizon::Pool::clear |
( |
| ) |
|
|
overridevirtual |
Clears all lazy-loaded objects.
Doing so will invalidate all references pointers by get_entity and friends.
Implements horizon::IPool.
◆ get_actually_included_pools()
std::map< std::string, UUID > horizon::Pool::get_actually_included_pools |
( |
bool |
include_self | ) |
|
|
overridevirtual |
◆ get_alternate_packages()
std::set< UUID > horizon::Pool::get_alternate_packages |
( |
const UUID & |
uu | ) |
|
|
overridevirtual |
◆ get_base_path()
const std::string & horizon::Pool::get_base_path |
( |
| ) |
const |
|
overridevirtual |
◆ get_db()
◆ get_decal()
const Decal * horizon::Pool::get_decal |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_entity()
const Entity * horizon::Pool::get_entity |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_frame()
const Frame * horizon::Pool::get_frame |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_model_filename()
std::string horizon::Pool::get_model_filename |
( |
const UUID & |
pkg_uuid, |
|
|
const UUID & |
model_uuid |
|
) |
| |
|
overridevirtual |
◆ get_package()
const Package * horizon::Pool::get_package |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_padstack()
const Padstack * horizon::Pool::get_padstack |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_parametric()
◆ get_part()
const Part * horizon::Pool::get_part |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_pool_info()
const PoolInfo & horizon::Pool::get_pool_info |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ get_symbol()
const Symbol * horizon::Pool::get_symbol |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_unit()
const Unit * horizon::Pool::get_unit |
( |
const UUID & |
uu, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ get_well_known_padstack()
const Padstack * horizon::Pool::get_well_known_padstack |
( |
const std::string & |
name, |
|
|
UUID * |
pool_uuid_out = nullptr |
|
) |
| |
|
overridevirtual |
◆ db
The database connection.
You may use it to perform more advanced queries on the pool.
The documentation for this class was generated from the following files: