vg
tools for working with variation graphs
Public Member Functions | Private Attributes | List of all members
vg::IndexFile Class Reference

#include <index_registry.hpp>

Public Member Functions

 IndexFile (const string &identifier, const string &suffix)
 Create a new IndexFile with a unique identifier. More...
 
const string & get_identifier () const
 Get the globally unique identifier for this index. More...
 
const vector< string > & get_filenames () const
 Get the filename(s) that contain this index. More...
 
const vector< IndexRecipe > & get_recipes () const
 Get the list of recipes that this index can be built with. More...
 
void provide (const vector< string > &filenames)
 Identify a serialized file that already contains this index. More...
 
void add_recipe (const vector< const IndexFile * > &inputs, const function< vector< string >(const vector< const IndexFile * > &, const string &, const string &)> &exec)
 
bool is_finished () const
 Returns true if the index has already been built or provided. More...
 
void execute_recipe (size_t recipe_priority, const string &prefix)
 Build the index using the recipe with the provided priority. More...
 
bool was_provided_directly () const
 Returns true if the index was provided through provide method. More...
 

Private Attributes

string identifier
 
string suffix
 
vector< string > filenames
 
vector< IndexReciperecipes
 
bool provided_directly = false
 

Detailed Description

An object that generically represents a serializable index or input file

Constructor & Destructor Documentation

◆ IndexFile()

vg::IndexFile::IndexFile ( const string &  identifier,
const string &  suffix 
)

Create a new IndexFile with a unique identifier.

Member Function Documentation

◆ add_recipe()

void vg::IndexFile::add_recipe ( const vector< const IndexFile * > &  inputs,
const function< vector< string >(const vector< const IndexFile * > &, const string &, const string &)> &  exec 
)

Describe a recipe with a lower preference order than all existing recipes for creating this index, if there are any (i.e., recipes must be added in preference order). Recipes should return the filepath(s) to their output.

◆ execute_recipe()

void vg::IndexFile::execute_recipe ( size_t  recipe_priority,
const string &  prefix 
)

Build the index using the recipe with the provided priority.

◆ get_filenames()

const vector< string > & vg::IndexFile::get_filenames ( ) const

Get the filename(s) that contain this index.

◆ get_identifier()

const string & vg::IndexFile::get_identifier ( ) const

Get the globally unique identifier for this index.

◆ get_recipes()

const vector< IndexRecipe > & vg::IndexFile::get_recipes ( ) const

Get the list of recipes that this index can be built with.

◆ is_finished()

bool vg::IndexFile::is_finished ( ) const

Returns true if the index has already been built or provided.

◆ provide()

void vg::IndexFile::provide ( const vector< string > &  filenames)

Identify a serialized file that already contains this index.

◆ was_provided_directly()

bool vg::IndexFile::was_provided_directly ( ) const

Returns true if the index was provided through provide method.

Member Data Documentation

◆ filenames

vector<string> vg::IndexFile::filenames
private

◆ identifier

string vg::IndexFile::identifier
private

◆ provided_directly

bool vg::IndexFile::provided_directly = false
private

◆ recipes

vector<IndexRecipe> vg::IndexFile::recipes
private

◆ suffix

string vg::IndexFile::suffix
private

The documentation for this class was generated from the following files: