18#ifndef LIMA_ANNOTATIONGRAPHS_GENERICANNOTATION_H
19#define LIMA_ANNOTATIONGRAPHS_GENERICANNOTATION_H
22#include <boost/any.hpp>
26namespace AnnotationGraphs {
49 return boost::any_cast<ValueType>(&m_annot);
52 template<
typename ValueType>
const ValueType *
pointerValue()
const
54 return boost::any_cast<ValueType>(&m_annot);
57 template<
typename ValueType> ValueType
value()
const
59 return boost::any_cast<ValueType>(m_annot);
68 os << ga.
value<ValueType>();
This class allows to convert any object into an annotation by inheritance.
GenericAnnotation(const GenericAnnotation &ga)
virtual ~GenericAnnotation()
GenericAnnotation & operator=(const GenericAnnotation &ga)
ValueType * pointerValue()
GenericAnnotation & operator=(const ValueType &v)
GenericAnnotation(const ValueType &v)
const ValueType * pointerValue() const
LIMA_ANNOTATIONGRAPH_EXPORT QDebug & operator<<(QDebug &os, const AnnotationGraphEdge &e)