7 #ifndef VALUE_VARIANT_HPP_ 8 #define VALUE_VARIANT_HPP_ 10 #include "boost/array.hpp" 11 #include "boost/mpl/begin.hpp" 12 #include "boost/mpl/distance.hpp" 13 #include "boost/mpl/find.hpp" 14 #include "boost/mpl/size.hpp" 15 #include "boost/variant.hpp" 26 bool operator==(
Blank const&)
const {
return true;}
27 bool operator<(
Blank const&)
const {
return false;}
32 inline std::size_t hash_value(
Blank const&) {
return 0xd5d6573673acc2a3;}
36 template<
class ChT,
class Tr>
inline 37 std::basic_ostream<ChT,Tr>& operator<<(
38 std::basic_ostream<ChT,Tr>& os,
41 return os <<
"Undetermined";
46 typedef boost::variant<
47 Blank, bool, long, double, std::string,
54 inline std::string
const& variable_type_str(
const int which) {
57 boost::mpl::size<value_variant::types>::value
59 static const array a =
61 "blank",
"bool",
"integer",
"float",
"string",
71 typename boost::mpl::begin<value_variant::types>::type,
72 typename boost::mpl::find<value_variant::types,T>::type
78 inline bool is_blank(value_variant
const& vv) {
79 return boost::get<Blank>(&vv);
84 struct Type_name :
public boost::static_visitor<std::string const&> {
86 std::string
const& operator()(T
const&)
const {
95 inline std::string
const& variable_type_str(value_variant
const& vv) {
101 VDJ_PIPE_DECL value_variant parse_variant(std::string
const& s);
Definition: value_variant.hpp:69
Definition: sequence_record.hpp:35
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: value_variant.hpp:84
Definition: value_variant.hpp:25