vg
tools for working with variation graphs
Loading...
Searching...
No Matches
annotation.hpp File Reference
#include <vector>
#include <string>
#include <type_traits>
#include <functional>
#include <limits>
#include <cmath>
#include <sstream>
#include <google/protobuf/struct.pb.h>

Classes

struct  vg::Annotation< T, Enabled >

Namespaces

namespace  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.
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 AnnotatonValueType, typename Annotated>
void vg::set_compressed_annotation (Annotated *annotated, const string &base_name, std::vector< AnnotatonValueType > annotation)
template<typename AnnotatonValueType, typename Annotated>
void vg::set_compressed_annotation (Annotated &annotated, const string &base_name, std::vector< AnnotatonValueType > annotation)
template<typename Annotated>
void vg::clear_annotation (Annotated *annotated, const string &name)
 Clear the annotation with the given name.
template<typename Annotated>
void vg::clear_annotation (Annotated &annotated, const string &name)
 Clear the annotation with the given name.
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>
T vg::value_cast (const google::protobuf::Value &value)
 Cast a Protobuf generic Value to any type.
template<typename T>
google::protobuf::Value vg::value_cast (const T &wrap)
 Cast any type to a generic Protobuf value.
template<>
const google::protobuf::Struct * vg::value_cast< const google::protobuf::Struct * > (const google::protobuf::Value &value)
template<>
const google::protobuf::Value * vg::value_cast< const google::protobuf::Value * > (const google::protobuf::Value &value)
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.
template<typename Container>
google::protobuf::Value vg::value_cast (const Container &wrap)

Detailed Description

utilities for working with Struct-formatted annotations on Protobuf objects