46 template<>
struct getarg<const char*> {
58 std::string argnames[N+1];
60 def.
name = name.c_str();
63 for(
size_t i=0;
i<N;
i++)
66 template<
int n,
typename T>
67 void set(
const char *name) {
69 args[n].
name = argnames[n].c_str();
74 template<
void (*fn)()>
80 template<
typename A,
void (*fn)(A)>
86 template<
typename A,
typename B,
void (*fn)(A,B)>
93 template<
typename A,
typename B,
typename C,
void (*fn)(A,B,C)>
104 template<
void (*fn)()>
111 template<
typename A,
void (*fn)(A)>
115 info.
set<0,A>(arg1name);
119 template<
typename A,
typename B,
void (*fn)(A,B)>
121 const char *arg1name,
122 const char *arg2name)
125 info.
set<0,A>(arg1name);
126 info.
set<1,B>(arg2name);
130 template<
typename A,
typename B,
typename C,
void (*fn)(A,B,C)>
132 const char *arg1name,
133 const char *arg2name,
134 const char *arg3name)
137 info.
set<0,A>(arg1name);
138 info.
set<1,B>(arg2name);
139 info.
set<2,C>(arg3name);
143 template<
typename V, V* addr>
148 def[0].
pval = (
void*)addr;
156 #endif // IOCSHELPER_H
void set(const char *name)
static const char * op(const iocshArgBuf &a)
TODO only here because of the Lockable.
void iocshRegister(const char *name)
const iocshArg *const * arg
static double op(const iocshArgBuf &a)
iocshFuncInfo(const std::string &n)
void epicsStdCall iocshRegisterVariable(const iocshVarDef *piocshVarDef)
const ChannelProviderRegistry::factoryfn_t fn
void iocshVariable(const char *name)
static char * op(const iocshArgBuf &a)
static int op(const iocshArgBuf &a)