32 #ifndef _QORE_OBJECTMETHODREFERENCE_H
34 #define _QORE_OBJECTMETHODREFERENCE_H
38 class AbstractParseObjectMethodReferenceNode :
public ParseNode {
47 DLLLOCAL AbstractParseObjectMethodReferenceNode(
const QoreProgramLocation* loc) : ParseNode(loc,
NT_OBJMETHREF) {
50 DLLLOCAL
virtual ~AbstractParseObjectMethodReferenceNode() {
54 str.
sprintf(
"object method reference (%p)",
this);
62 getAsString(*rv, foff, xsink);
67 DLLLOCAL
virtual const char* getTypeName()
const {
68 return "object method reference";
72 class ParseObjectMethodReferenceNode :
public AbstractParseObjectMethodReferenceNode {
80 DLLLOCAL
virtual ~ParseObjectMethodReferenceNode();
82 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
83 return callReferenceTypeInfo;
94 DLLLOCAL ParseObjectMethodReferenceNode(
const QoreProgramLocation* loc,
QoreValue n_exp,
char* n_method);
95 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
98 class ParseSelfMethodReferenceNode :
public AbstractParseObjectMethodReferenceNode {
103 DLLLOCAL ~ParseSelfMethodReferenceNode() {
106 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
108 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
109 return callReferenceTypeInfo;
117 DLLLOCAL ParseSelfMethodReferenceNode(
const QoreProgramLocation* loc,
char* n_method) : AbstractParseObjectMethodReferenceNode(loc), method(n_method), meth(0) {
121 DLLLOCAL ParseSelfMethodReferenceNode(
const QoreProgramLocation* loc,
const QoreMethod* m) : AbstractParseObjectMethodReferenceNode(loc), meth(m) {
125 class ParseScopedSelfMethodReferenceNode :
public AbstractParseObjectMethodReferenceNode {
130 DLLLOCAL
virtual ~ParseScopedSelfMethodReferenceNode();
136 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
137 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
138 return callReferenceTypeInfo;
142 DLLLOCAL ParseScopedSelfMethodReferenceNode(
const QoreProgramLocation* loc, NamedScope *n_nscope);