vg
tools for working with variation graphs
Classes | Namespaces | Functions
annotation.hpp File Reference
#include <vector>
#include <string>
#include <type_traits>
#include <functional>
#include <limits>
#include <cmath>
#include <google/protobuf/struct.pb.h>

Classes

struct  vg::Annotation< T, Enabled >
 

Namespaces

 vg
 

Functions

template<typename Annotated >
bool vg::has_annotation (const Annotated &annotated, const string &name)
 Returns true if the Protobuf object has an annotation with this name. More...
 
template<typename AnnotationType , typename Annotated >
AnnotationType vg::get_annotation (const Annotated &annotated, const string &name)
 
template<typename AnnotationType , typename Annotated >
AnnotationType vg::get_annotation (Annotated *annotated, const string &name)
 
template<typename AnnotationType , typename Annotated >
void vg::set_annotation (Annotated *annotated, const string &name, const AnnotationType &annotation)
 
template<typename AnnotationType , typename Annotated >
void vg::set_annotation (Annotated &annotated, const string &name, const AnnotationType &annotation)
 
template<typename Annotated >
void vg::clear_annotation (Annotated *annotated, const string &name)
 Clear the annotation with the given name. More...
 
template<typename Annotated >
void vg::clear_annotation (Annotated &annotated, const string &name)
 Clear the annotation with the given name. More...
 
template<typename Annotated >
void vg::for_each_basic_annotation (const Annotated &annotated, const function< void(const string &)> null_lambda, const function< void(const string &, double)> double_lambda, const function< void(const string &, bool)> bool_lambda, const function< void(const string &, const string &)> string_lambda)
 
template<typename T >
vg::value_cast (const google::protobuf::Value &value)
 Cast a Protobuf generic Value to any type. More...
 
template<typename T >
google::protobuf::Value vg::value_cast (const T &wrap)
 Cast any type to a generic Protobuf value. More...
 
template<>
bool vg::value_cast< bool > (const google::protobuf::Value &value)
 
template<>
double vg::value_cast< double > (const google::protobuf::Value &value)
 
template<>
string vg::value_cast< string > (const google::protobuf::Value &value)
 
template<>
google::protobuf::Value vg::value_cast< bool > (const bool &wrap)
 
template<>
google::protobuf::Value vg::value_cast< double > (const double &wrap)
 
template<>
google::protobuf::Value vg::value_cast< string > (const string &wrap)
 
template<>
google::protobuf::Value vg::value_cast< size_t > (const size_t &wrap)
 
template<>
google::protobuf::Value vg::value_cast< int > (const int &wrap)
 
template<typename Container >
Container vg::value_cast (const google::protobuf::Value &value)
 Cast a Protobuf generic Value to any type. More...
 
template<typename Container >
google::protobuf::Value vg::value_cast (const Container &wrap)
 

Detailed Description

utilities for working with Struct-formatted annotations on Protobuf objects