Changeset 46 in pacpusframework for trunk


Ignore:
Timestamp:
01/08/13 23:52:19 (11 years ago)
Author:
sgosseli
Message:

Improvement: when instantiated, check if ComponentBase is base of T.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/Pacpus/kernel/ComponentFactory.h

    r45 r46  
    1515
    1616#include <cassert>
     17
     18#include <boost/static_assert.hpp>
     19#include <boost/type_traits/is_base_of.hpp>
    1720
    1821#include <Pacpus/kernel/ComponentFactoryBase.h>
     
    4043    : public ComponentFactoryBase
    4144{
     45    BOOST_STATIC_ASSERT_MSG((boost::is_base_of<ComponentBase, T>::value), "T must inherit from ComponentBase");
    4246public:
    4347    /** Ctor of ComponentFactory, initialize the factory of the components of type @em T.
Note: See TracChangeset for help on using the changeset viewer.