Go to the documentation of this file.
11 #define BOOST_TEST_MODULE customEntity
13 #if BOOST_VERSION >= 105900
14 #include <boost/test/tools/output_test_stream.hpp>
16 #include <boost/test/output_test_stream.hpp>
18 #include <boost/test/unit_test.hpp>
20 using boost::test_tools::output_test_stream;
31 void display(std::ostream &os)
const { os <<
"custom entity"; }
42 BOOST_CHECK_EQUAL(entity->
getName(),
"my-entity");
43 BOOST_CHECK_EQUAL(entity->Entity::getClassName(),
"Entity");
56 output_test_stream output;
59 BOOST_CHECK(output.is_equal(
"custom entity"));
BOOST_AUTO_TEST_CASE(constructor)
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(CustomEntity, "CustomEntity")
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
const std::string & getName() const
void display(std::ostream &os) const
Display information on the entity inside the output stream os.
CustomEntity(const std::string &n)
static const std::string CLASS_NAME
virtual const std::string & getClassName() const
virtual void display(std::ostream &os) const
Display information on the entity inside the output stream os.
Entity(const std::string &name)
virtual const std::string & getClassName() const
static void destroy()
Destroy the unique instance of the class.
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