vg
tools for working with variation graphs
Public Member Functions | Static Public Member Functions | List of all members
vg::PositionIDScanner< Message > Struct Template Reference

#include <scanner.hpp>

Public Member Functions

bool scan (const Mapping &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Path &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Alignment &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Node &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Edge &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Graph &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Mapping &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Path &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Alignment &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Node &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Edge &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 
bool scan (const Graph &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 

Static Public Member Functions

static bool scan (const Message &msg, const function< bool(const Position &)> &pos_iteratee, const function< bool(const id_t &)> &id_iteratee)
 

Detailed Description

template<typename Message>
struct vg::PositionIDScanner< Message >

We define a PositionIDScanner that scans a VG Protobuf message tree for whole Position objects and node IDs. Each of the two is visited with its own iteratee function. May emit the same Position or id multiple times. Will never emit an empty Position. Will only emit the 0 node ID if a Graph or Path contains no nonzero node IDs.

Member Function Documentation

◆ scan() [1/13]

bool vg::PositionIDScanner< Alignment >::scan ( const Alignment msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [2/13]

bool vg::PositionIDScanner< Alignment >::scan ( const Alignment msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [3/13]

bool vg::PositionIDScanner< Edge >::scan ( const Edge msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [4/13]

bool vg::PositionIDScanner< Edge >::scan ( const Edge msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [5/13]

bool vg::PositionIDScanner< Graph >::scan ( const Graph msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [6/13]

bool vg::PositionIDScanner< Graph >::scan ( const Graph msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [7/13]

bool vg::PositionIDScanner< Mapping >::scan ( const Mapping msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [8/13]

bool vg::PositionIDScanner< Mapping >::scan ( const Mapping msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [9/13]

template<typename Message >
static bool vg::PositionIDScanner< Message >::scan ( const Message &  msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)
static

Scan over the Position objects and non-Position-wrapped node IDs in this message and all its children. Returns false if an iteratee returned false and asked to stop.

◆ scan() [10/13]

bool vg::PositionIDScanner< Node >::scan ( const Node msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [11/13]

bool vg::PositionIDScanner< Node >::scan ( const Node msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [12/13]

bool vg::PositionIDScanner< Path >::scan ( const Path msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

◆ scan() [13/13]

bool vg::PositionIDScanner< Path >::scan ( const Path msg,
const function< bool(const Position &)> &  pos_iteratee,
const function< bool(const id_t &)> &  id_iteratee 
)

The documentation for this struct was generated from the following file: