vg
tools for working with variation graphs
Public Member Functions | Public Attributes | List of all members
bdsg::HashGraph::path_t Class Reference

Public Member Functions

 path_t ()
 
 path_t (const string &name, const int64_t &path_id, bool is_circular=false)
 
 path_t (path_t &&other)
 Move constructor. More...
 
path_toperator= (path_t &&other)
 Move assignment. More...
 
 path_t (const path_t &other)
 Copy constructor. More...
 
path_toperator= (const path_t &other)
 Copy assignment. More...
 
 ~path_t ()
 
path_mapping_tpush_back (const handle_t &handle)
 Add a node to the end of the path. More...
 
path_mapping_tpush_front (const handle_t &handle)
 Add a node to the front of the path. More...
 
void remove (path_mapping_t *mapping)
 Remove the mapping from the path and free its memory. More...
 
path_mapping_tinsert_before (const handle_t &handle, path_mapping_t *mapping)
 
void serialize (ostream &out) const
 
void deserialize (istream &in)
 Read the path (in the format written by serialize()) from an in stream. More...
 

Public Attributes

path_mapping_thead = nullptr
 
path_mapping_ttail = nullptr
 
size_t count = 0
 
int64_t path_id = 0
 
string name
 
bool is_circular = false
 

Constructor & Destructor Documentation

◆ path_t() [1/4]

bdsg::HashGraph::path_t::path_t ( )

◆ path_t() [2/4]

bdsg::HashGraph::path_t::path_t ( const string &  name,
const int64_t &  path_id,
bool  is_circular = false 
)

◆ path_t() [3/4]

bdsg::HashGraph::path_t::path_t ( path_t &&  other)

Move constructor.

◆ path_t() [4/4]

bdsg::HashGraph::path_t::path_t ( const path_t other)

Copy constructor.

◆ ~path_t()

bdsg::HashGraph::path_t::~path_t ( )

Member Function Documentation

◆ deserialize()

void bdsg::HashGraph::path_t::deserialize ( istream &  in)

Read the path (in the format written by serialize()) from an in stream.

◆ insert_before()

HashGraph::path_mapping_t * bdsg::HashGraph::path_t::insert_before ( const handle_t handle,
path_mapping_t mapping 
)

Insert a new node into the middle of the path. If the the provided node is null, inserts at the end.

◆ operator=() [1/2]

HashGraph::path_t & bdsg::HashGraph::path_t::operator= ( const path_t other)

Copy assignment.

◆ operator=() [2/2]

HashGraph::path_t & bdsg::HashGraph::path_t::operator= ( path_t &&  other)

Move assignment.

◆ push_back()

HashGraph::path_mapping_t * bdsg::HashGraph::path_t::push_back ( const handle_t handle)

Add a node to the end of the path.

◆ push_front()

HashGraph::path_mapping_t * bdsg::HashGraph::path_t::push_front ( const handle_t handle)

Add a node to the front of the path.

◆ remove()

void bdsg::HashGraph::path_t::remove ( path_mapping_t mapping)

Remove the mapping from the path and free its memory.

◆ serialize()

void bdsg::HashGraph::path_t::serialize ( ostream &  out) const

Write the path to an out stream, applying the given offset to all node IDs referenced by the path.

Member Data Documentation

◆ count

size_t bdsg::HashGraph::path_t::count = 0

◆ head

path_mapping_t* bdsg::HashGraph::path_t::head = nullptr

◆ is_circular

bool bdsg::HashGraph::path_t::is_circular = false

◆ name

string bdsg::HashGraph::path_t::name

◆ path_id

int64_t bdsg::HashGraph::path_t::path_id = 0

◆ tail

path_mapping_t* bdsg::HashGraph::path_t::tail = nullptr

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