@@ -63,6 +63,16 @@ class CustomEntity : public Entity {
6363 *this , &CustomEntity::four_args,
6464 docCommandVoid4 (" four args" , " int" , " int" , " int" , " int" )));
6565
66+ addCommand (" 1_arg_r" ,
67+ makeCommandReturnType1 (
68+ *this , &CustomEntity::one_arg_ret,
69+ docCommandVoid1 (" one arg" , " int" )));
70+
71+ addCommand (" 2_args_r" ,
72+ makeCommandReturnType2 (
73+ *this , &CustomEntity::two_args_ret,
74+ docCommandVoid2 (" two args" , " int" ," int" )));
75+
6676 // / Generating an exception by adding a command which already exist
6777 bool res = false ;
6878 std::string e_1_arg (" 1_arg" );
@@ -89,6 +99,12 @@ class CustomEntity : public Entity {
8999 void four_args (const int &, const int &, const int &, const int &) {
90100 test_four_args_ = true ;
91101 }
102+
103+ int one_arg_ret (const int &) { test_one_arg_ = true ; return 2 ;}
104+
105+ std::string two_args_ret (const int &, const int &)
106+ { test_two_args_ = true ; return std::string (" return" );}
107+
92108};
93109DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (CustomEntity, " CustomEntity" );
94110} // namespace dynamicgraph
0 commit comments