class
librarycontainer class for meta::
a meta::
There are also facilities to have psl::
constructors, destructors, conversion operators
member-functions
Function documentation
psl:: meta:: library:: library(psl:: string8:: view lib,
std::vector<psl:: string8_t> environment = {})
Brief
location on disk where the library can be found.
Details
The constructor will try to load the given filepath, and then parse it. It will also create the minimal representation of each meta::
Parameters | |
---|---|
lib in | The filepath to which file should be loaded. This path can either be absolute or relative. |
environment |
bool psl:: meta:: library:: serialize(const psl:: UID& uid)
Brief
serializes the given psl::
Details
When you send a psl::
Parameters | |
---|---|
uid in | The psl:: |
Returns | true when the psl:: |
bool psl:: meta:: library:: remove(const psl:: UID& uid,
bool safe_mode = true)
Brief
tries to remove the given psl::
Details
Will try to remove the given psl::
safe_mode controls wether you should avoid deleting this instance if others are still referencing this psl::
Parameters | |
---|---|
uid in | The psl:: |
safe_mode in | when true (default), will disallow removing as long as this item is being referenced by others. |
Returns | true if the instance was removed or not. |
bool psl:: meta:: library:: contains(const psl:: UID& uid) const
Brief
searches the meta::
Parameters | |
---|---|
uid in | The psl:: |
Returns | true if found. |
std::optional<psl:: UID> psl:: meta:: library:: find(psl:: string8:: view tag) const
Brief
searches for the first psl::
Parameters | |
---|---|
tag in | The tag to look for, it is case-sensetive. |
Returns | optionally the first found psl:: |
std::unordered_set<psl:: UID> psl:: meta:: library:: find_all(psl:: string8:: view tag) const
Brief
advanced version of find() that finds all instances of the given tag.
Parameters | |
---|---|
tag in | The tag to look for, it is case-sensetive. |
Returns | an unordered_set of all psl:: |
const std::vector<psl:: string8_t>& psl:: meta:: library:: tags(const psl:: UID& uid) const
Brief
get all tags (if any) associated with the given psl::
Details
Parameters | |
---|---|
uid in | the psl:: |
Returns | a list of all found tags. |
bool psl:: meta:: library:: set(const psl:: UID& uid,
psl:: string8:: view tag)
Brief
associates the tag with this specific psl::
Details
Parameters | |
---|---|
uid in | the psl:: |
tag in | the tag to apply to the psl:: |
Returns | if this was successful or not. It could return false in case the psl:: |
bool psl:: meta:: library:: set(const psl:: UID& uid,
std::vector<psl:: string8:: view> tags)
Brief
advanced version of set() that allows a list of tags.
Details
Parameters | |
---|---|
uid in | the psl:: |
tags in | the tags to apply to the psl:: |
Returns | if this was successful or not. It could return false in case the psl:: |
std::unordered_set<psl:: UID> psl:: meta:: library:: referencing(const psl:: UID& uid) const
Brief
gets a list of all psl::
Details
as an example, a core::
Parameters | |
---|---|
uid in | the psl:: |
Returns | a list of all psl:: |
std::unordered_set<psl:: UID> psl:: meta:: library:: referencedBy(const psl:: UID& uid) const
Brief
gets a list of all psl::
Details
as an example, a core::
Parameters | |
---|---|
uid in | the psl:: |
Returns | a list of all psl:: |
std::optional<psl:: string8:: view> psl:: meta:: library:: load(const psl:: UID& uid)
Brief
loads the specific psl::
Details
Loads the specified psl::
Parameters | |
---|---|
uid in | the given psl:: |
Returns | the resulting content in UTF-8 format if found. |
bool psl:: meta:: library:: unload(const psl:: UID& uid)
Brief
purges the specific psl::
Details
Unloads the specified psl::
Parameters | |
---|---|
uid in | the given psl:: |
Returns | true if it was found on the meta:: |
template<typename T = file>
std::optional<T*> psl:: meta:: library:: get(const psl:: UID& uid) const
Brief
get the psl::
Details
Searches the meta::
Template parameters | |
---|---|
T | should satisfy at least being either meta:: |
Parameters | |
uid in | the given psl:: |
Returns | the meta:: |
bool psl:: meta:: library:: is_physical_file(const psl:: UID& uid) const
Brief
checks if the given psl::
Details
Parameters | |
---|---|
uid in | the psl:: |
Returns | true in case it has a persistent backing (that will survive a reboot). |
std::optional<psl:: string8_t> psl:: meta:: library:: get_physical_location(const psl:: UID& uid) const
Brief
gets the relative location (to the meta::
Details
Parameters | |
---|---|
uid in | the psl:: |
Returns | the relative location to the meta:: |
size_t psl:: meta:: library:: size() const
Brief
returns the count of psl::
Returns | the amount of unique psl:: |
---|