Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
A set of user inputs used to set input preferences during search and resolution. More...
#include <registry.hh>
Public Member Functions | |
RegistryRaw (const RegistryRaw &)=default | |
RegistryRaw (RegistryRaw &&)=default | |
RegistryRaw & | operator= (const RegistryRaw &)=default |
RegistryRaw & | operator= (RegistryRaw &&)=default |
RegistryRaw (std::map< std::string, RegistryInput > inputs, InputPreferences defaults={}, std::vector< std::string > priority={}) | |
RegistryRaw (std::map< std::string, RegistryInput > inputs, std::vector< std::string > priority={}) | |
virtual std::vector< std::reference_wrapper< const std::string > > | getOrder () const |
Return an ordered list of input names. | |
virtual void | clear () |
Reset to default state. | |
pkgdb::PkgQueryArgs & | fillPkgQueryArgs (const std::string &input, pkgdb::PkgQueryArgs &pqa) const |
Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages in a particular input. | |
void | merge (const RegistryRaw &overrides) |
Merge this flox::RegistryRaw struct with another flox::RegistryRaw, overriding any existing values with those from the other RegistryRaw. | |
bool | operator== (const RegistryRaw &other) const |
bool | operator!= (const RegistryRaw &other) const |
Public Attributes | |
std::map< std::string, RegistryInput > | inputs |
InputPreferences | defaults |
std::vector< std::string > | priority |
A set of user inputs used to set input preferences during search and resolution.
Example Registry:
pkgdb::PkgQueryArgs & flox::RegistryRaw::fillPkgQueryArgs | ( | const std::string & | input, |
pkgdb::PkgQueryArgs & | pqa | ||
) | const |
Fill a flox::pkgdb::PkgQueryArgs struct with preferences to lookup packages in a particular input.
input | The input name to be searched. |
pqa | A set of query args to fill with preferences. |
|
virtual |
Return an ordered list of input names.
This appends priority with any missing inputs in lexicographical order.
The resulting list contains wrapped references and need to be accessed using std::reference_wrapper<T>::get().
Example:
void flox::RegistryRaw::merge | ( | const RegistryRaw & | overrides | ) |
Merge this flox::RegistryRaw struct with another flox::RegistryRaw, overriding any existing values with those from the other RegistryRaw.
InputPreferences flox::RegistryRaw::defaults |
Default/fallback settings for inputs.
std::map<std::string, RegistryInput> flox::RegistryRaw::inputs |
Settings and fetcher information associated with named inputs.
std::vector<std::string> flox::RegistryRaw::priority |
Priority order used to process inputs. Inputs which do not appear in this list are handled in lexicographical order after any explicitly named inputs.