Go to the documentation of this file.
10 #define BOOST_TEST_MODULE factory
12 #if BOOST_VERSION >= 105900
13 #include <boost/test/tools/output_test_stream.hpp>
15 #include <boost/test/output_test_stream.hpp>
17 #include <boost/test/unit_test.hpp>
19 using boost::test_tools::output_test_stream;
46 BOOST_ERROR(
"Should never happen.");
48 BOOST_CHECK_EQUAL(exception.
getCode(),
54 BOOST_ERROR(
"Should never happen.");
56 BOOST_CHECK_EQUAL(exception.
getCode(),
66 BOOST_ERROR(
"Should never happen.");
68 BOOST_CHECK_EQUAL(exception.
getCode(),
75 BOOST_ERROR(
"Should never happen.");
77 BOOST_CHECK_EQUAL(exception.
getCode(),
87 boost::shared_ptr<dynamicgraph::Entity> entity(
91 boost::shared_ptr<dynamicgraph::Entity> entity2(
95 boost::shared_ptr<dynamicgraph::Entity> entity3(
102 BOOST_ERROR(
"Should never happen.");
104 BOOST_CHECK_EQUAL(exception.
getCode(),
113 BOOST_CHECK_EQUAL(exception.
getCode(),
static void destroy()
Destroy the unique instance of the class.
virtual const std::string & getClassName() const
BOOST_AUTO_TEST_CASE(constructor)
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
CustomEntity(const std::string &n)
void registerEntity(const std::string &entname, EntityConstructor_ptr ent)
Add a new entity to the factory.
int getCode() const
Access to the error code.
Entity(const std::string &name)
void deregisterEntity(const std::string &entname)
Delete an entity from the factory.
static const std::string CLASS_NAME
bool existEntity(const std::string &name) const
Check if an Entity associated with a particular name has already been registered.
dynamicgraph::Entity * makeEntity(const std::string &objectName)
Entity * newEntity(const std::string &classname, const std::string &objname) const
Instantiate (and allocate) an entity.
static FactoryStorage * getInstance()
Get pointer to unique object of the class.
dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Fri Aug 2 2024 08:36:38