OKlibrary  0.2.1.6
LibraryBasics.hpp File Reference

The very basic concepts for the library. Every unit where concepts are defined and/or checked should include this file. Provides macros OKLIB_MODELS_CONCEPT_REQUIRES and OKLIB_MODELS_CONCEPT_TAG for checking whether a class models a concept and has the required concept tag. Every "own concept" of the library must be a refinement of BasicRequirements. More...

#include <tr1/type_traits>
#include <boost/concept_check.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <OKlib/Concepts/ConceptsBase.hpp>
#include <OKlib/Concepts/ConceptsMetafunctions.hpp>
#include <OKlib/Concepts/Basics.hpp>

Go to the source code of this file.

Classes

class  OKlib::Concepts::WithConceptTag< T >
 Basic internal concept, statically asserting the concept tag. More...
struct  OKlib::Concepts::WithConceptTag_tag
class  OKlib::Concepts::WithConceptTag_Archetype
struct  OKlib::Concepts::WithConceptTag_Archetype::concept_tag_
class  OKlib::Concepts::BasicRequirements< T >
 Root of the concept hierarchy for the library, requiring a concept tag and const correctness. More...
struct  OKlib::Concepts::BasicRequirements_tag
class  OKlib::Concepts::BasicRequirements_Archetype
class  OKlib::Concepts::convertible_to_bool
 Fully constructible class, implicitely convertible to bool. More...

Namespaces

namespace  OKlib
 

All components of the OKlibrary.


namespace  OKlib::Concepts
 

Concept definitions and accompanying generic tests.


Defines

#define OKLIB_MODELS_CONCEPT_REQUIRES(C, concept)   ::boost::function_requires<concept<C> >();
 Use OKLIB_MODELS_CONCEPT_REQUIRES(C, concept) in order to require that class C models "concept".
#define OKLIB_MODELS_CONCEPT_TAG(C, concept)   BOOST_STATIC_ASSERT((::OKlib::Concepts::IsTagModel< C, concept ## _tag >::value));
 Use OKLIB_MODELS_CONCEPT_TAG(C, concept) in order to require that class C has a concept tag derived from "concept_tag".
#define OKLIB_MODELS_CONCEPT_TAG_T(Tag, concept)   BOOST_STATIC_ASSERT((std::tr1::is_base_of<concept ## _tag, Tag>::value));
 Use OKLIB_MODELS_CONCEPT_TAG_T(tag, concept) in order to require that tag is derived from "concept_tag".

Detailed Description

The very basic concepts for the library. Every unit where concepts are defined and/or checked should include this file. Provides macros OKLIB_MODELS_CONCEPT_REQUIRES and OKLIB_MODELS_CONCEPT_TAG for checking whether a class models a concept and has the required concept tag. Every "own concept" of the library must be a refinement of BasicRequirements.

Includes boost/concept_check, boost/static_assert, boost/type_traits, and ConceptsBase, ConceptsMetafunctions, Basics.

Todo:
Update the above description (several macros below are not captured yet).

Definition in file LibraryBasics.hpp.


Define Documentation

#define OKLIB_MODELS_CONCEPT_TAG_T (   Tag,
  concept 
)    BOOST_STATIC_ASSERT((std::tr1::is_base_of<concept ## _tag, Tag>::value));

Use OKLIB_MODELS_CONCEPT_TAG_T(tag, concept) in order to require that tag is derived from "concept_tag".

Used in cases where just a concept-tag has to be checked against a concept (and no enclosing model-class is given).

Definition at line 109 of file LibraryBasics.hpp.