@@ -63,6 +63,16 @@ class CustomEntity : public Entity {
63
63
*this , &CustomEntity::four_args,
64
64
docCommandVoid4 (" four args" , " int" , " int" , " int" , " int" )));
65
65
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
+
66
76
// / Generating an exception by adding a command which already exist
67
77
bool res = false ;
68
78
std::string e_1_arg (" 1_arg" );
@@ -89,6 +99,12 @@ class CustomEntity : public Entity {
89
99
void four_args (const int &, const int &, const int &, const int &) {
90
100
test_four_args_ = true ;
91
101
}
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
+
92
108
};
93
109
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN (CustomEntity, " CustomEntity" );
94
110
} // namespace dynamicgraph
0 commit comments