8 inline Funcdef::Funcdef(
const AnyString& name)
34 assert(not clid.
isVoid() and
"invalid classdef id");
35 parameters.push_back(std::make_pair(AnyString(), clid));
40 assert(not clid.
isVoid() and
"invalid classdef id");
41 parameters.push_back(std::make_pair(name, clid));
46 assert(not
name.empty() and
"invalid funcdef name");
47 return (not
name.empty()) and
name[0] ==
'@';
51 assert(not
name.empty() and
"invalid funcdef name");
52 return (not
name.empty()) and
name[0] !=
'@';
57 return (atom !=
nullptr) or (not
overloads.empty());
62 return (atom !=
nullptr);
bool hasParameters() const
Get if the funcdef has parameters.
Definition: funcdef.hxx:18
void appendParameter(const CLID &)
Append an unamed parameter.
Definition: funcdef.hxx:33
bool isPartiallyResolved() const
Get if the funcdef is resolved or has overloads.
Definition: funcdef.hxx:56
void resetReturnType(const CLID &)
Reset the return type.
Definition: funcdef.hxx:28
ClassdefOverloads overloads
Overloads.
Definition: funcdef.h:73
bool isVoid() const
Get if the clid is valid (aka != 0)
Definition: clid.hxx:21
CLID clid
clid
Definition: funcdef.h:65
CLID rettype
Return type (null means void)
Definition: funcdef.h:67
const AnyString name
Name of the func or the operator.
Definition: funcdef.h:63
bool isOperator() const
Is operator ?
Definition: funcdef.hxx:45
void reclassToVoid()
update to 'void'
Definition: clid.hxx:39
bool isFunc() const
Is a function ?
Definition: funcdef.hxx:50
std::vector< std::pair< AnyString, CLID > > parameters
parameters (name if name parameter, type)
Definition: funcdef.h:69
bool hasReturnType() const
Get if the funcdef has a return type ('void' otherwise)
Definition: funcdef.hxx:13
bool isFullyResolved() const
Get if the funcdef is fully resolved.
Definition: funcdef.hxx:61
void resetReturnTypeToVoid()
Reset the return type to void.
Definition: funcdef.hxx:23