MIRA
Classes | Namespaces | Macros
ExtensibleEnum.h File Reference

A replacement for enum that can be extended in subclasses. More...

#include <type_traits>
#include <boost/preprocessor/tuple/to_seq.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/thread/mutex.hpp>
#include <utils/VariadicMacro.h>
#include <serialization/SplitReflect.h>
#include <serialization/JSONSerializer.h>
Include dependency graph for ExtensibleEnum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  NoValueEnum< T >
 
struct  AutoCountingHelper< T, CountType, UseMutex >
 
struct  AutoCountingHelper< T, CountType, true >
 
struct  AutoCountingEnum< T, CountType, UseMutex >
 
struct  ExtensibleEnumBase< T, Counting, CountType, UseMutex >
 
struct  ExtensibleEnumBase< T, true, CountType, UseMutex >
 
struct  ExtensibleEnum< T, UseID, Counting, CountType, UseMutex >
 ExtensibleEnum is a base for derived classes that can be extensible 'replacements' for enum types. More...
 
struct  ExtensibleEnum< T, true, Counting, CountType, UseMutex >
 
struct  ExtEnum_RemoveBrackets< typename >
 
struct  ExtEnum_RemoveBrackets< void(T)>
 

Namespaces

 mira
 specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
 
 mira::detail
 

Macros

#define MIRA_EXTENUM_DECLARE_VALUE(R, ENUMNAME, VALUENAME)   const static ENUMNAME VALUENAME;
 
#define MIRA_EXTENSIBLE_ENUM_DECLARE(NAME, BASE, VALUES...)
 
#define MIRA_EXTENUM_DEFINE_VALUE(R, ENUMNAME, VALUENAME)   const ENUMNAME ENUMNAME::VALUENAME;
 
#define MIRA_EXTENSIBLE_ENUM_DEFINE(NAME, VALUES...)
 

Detailed Description

A replacement for enum that can be extended in subclasses.

Author
Christof Schröter
Date
2017/10/03

Macro Definition Documentation

◆ MIRA_EXTENUM_DECLARE_VALUE

#define MIRA_EXTENUM_DECLARE_VALUE (   R,
  ENUMNAME,
  VALUENAME 
)    const static ENUMNAME VALUENAME;

◆ MIRA_EXTENSIBLE_ENUM_DECLARE

#define MIRA_EXTENSIBLE_ENUM_DECLARE (   NAME,
  BASE,
  VALUES... 
)
Value:
struct NAME : public mira::detail::ExtEnum_RemoveBrackets<void (BASE)>::Result \
{ \
protected: \
NAME(const std::string& id = "") \
public: \
BOOST_PP_SEQ_FOR_EACH(MIRA_EXTENUM_DECLARE_VALUE, NAME, \
BOOST_PP_TUPLE_TO_SEQ(MIRA_VARIADIC_SIZE(VALUES), (VALUES)) ) \
};
Definition: ExtensibleEnum.h:321
#define MIRA_EXTENUM_DECLARE_VALUE(R, ENUMNAME, VALUENAME)
Definition: ExtensibleEnum.h:328
#define MIRA_VARIADIC_SIZE(...)
Definition: VariadicMacro.h:96

◆ MIRA_EXTENUM_DEFINE_VALUE

#define MIRA_EXTENUM_DEFINE_VALUE (   R,
  ENUMNAME,
  VALUENAME 
)    const ENUMNAME ENUMNAME::VALUENAME;

◆ MIRA_EXTENSIBLE_ENUM_DEFINE

#define MIRA_EXTENSIBLE_ENUM_DEFINE (   NAME,
  VALUES... 
)
Value:
BOOST_PP_SEQ_FOR_EACH(MIRA_EXTENUM_DEFINE_VALUE, NAME, \
BOOST_PP_TUPLE_TO_SEQ(MIRA_VARIADIC_SIZE(VALUES), (VALUES)) )
#define MIRA_EXTENUM_DEFINE_VALUE(R, ENUMNAME, VALUENAME)
Definition: ExtensibleEnum.h:342
#define MIRA_VARIADIC_SIZE(...)
Definition: VariadicMacro.h:96