OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4AulDefFunc Class Reference

#include <C4AulDefFunc.h>

Inheritance diagram for C4AulDefFunc:
[legend]
Collaboration diagram for C4AulDefFunc:
[legend]

Public Member Functions

 C4AulDefFunc (C4PropListStatic *Parent, C4ScriptFnDef *pDef)
 
 ~C4AulDefFunc () override
 
bool GetPublic () const override
 
const C4V_TypeGetParType () const override
 
C4V_Type GetRetType () const override
 
C4Value Exec (C4PropList *p, C4Value pPars[], bool fPassErrors=false) override
 

Public Attributes

C4ScriptFnDefDef
 

Private Member Functions

const char * GetName () const
 
virtual StdStrBuf GetFullName () const
 
virtual C4AulScriptFuncSFunc ()
 
virtual int GetParCount () const
 
C4Value Exec (C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
 
bool CheckParTypes (const C4Value pPars[], bool fPassErrors) const
 
void IncRef ()
 
void DecRef ()
 

Private Attributes

C4PropListStaticParent
 
C4RefCntPointer< C4StringName
 
C4AulFuncMapNext
 
unsigned int RefCnt {0}
 

Detailed Description

Definition at line 284 of file C4AulDefFunc.h.

Constructor & Destructor Documentation

C4AulDefFunc::C4AulDefFunc ( C4PropListStatic Parent,
C4ScriptFnDef pDef 
)

Definition at line 110 of file C4Script.cpp.

References C4VFunction(), C4AulFunc::Name, and C4PropList::SetPropertyByS().

110  :
111  C4AulFunc(Parent, pDef->Identifier), Def(pDef)
112 {
113  Parent->SetPropertyByS(Name, C4VFunction(this));
114 }
C4AulFunc(C4PropListStatic *Parent, const char *pName)
Definition: C4AulFunc.cpp:22
const char * Identifier
Definition: C4AulDefFunc.h:276
C4ScriptFnDef * Def
Definition: C4AulDefFunc.h:287
C4Value C4VFunction(C4AulFunc *pFn)
Definition: C4Value.h:250
virtual void SetPropertyByS(C4String *k, const C4Value &to)
Definition: C4PropList.cpp:952
C4RefCntPointer< C4String > Name
Definition: C4AulFunc.h:60

Here is the call graph for this function:

C4AulDefFunc::~C4AulDefFunc ( )
overridedefault

Member Function Documentation

C4Value C4AulDefFunc::Exec ( C4PropList p,
C4Value  pPars[],
bool  fPassErrors = false 
)
overridevirtual

Implements C4AulFunc.

Definition at line 118 of file C4Script.cpp.

References Def, and C4ScriptFnDef::FunctionC4V.

119 {
120  assert(Def->FunctionC4V);
121  return Def->FunctionC4V(p, pPars);
122 }
C4Value(* FunctionC4V)(C4PropList *_this, C4Value *)
Definition: C4AulDefFunc.h:280
C4ScriptFnDef * Def
Definition: C4AulDefFunc.h:287
const C4V_Type* C4AulDefFunc::GetParType ( ) const
inlineoverridevirtual

Implements C4AulFunc.

Definition at line 293 of file C4AulDefFunc.h.

References C4ScriptFnDef::ParType.

293 { return Def->ParType; }
C4V_Type ParType[10]
Definition: C4AulDefFunc.h:279
C4ScriptFnDef * Def
Definition: C4AulDefFunc.h:287
bool C4AulDefFunc::GetPublic ( ) const
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 292 of file C4AulDefFunc.h.

References C4ScriptFnDef::Public.

292 { return !!Def->Public; }
C4ScriptFnDef * Def
Definition: C4AulDefFunc.h:287
C4V_Type C4AulDefFunc::GetRetType ( ) const
inlineoverridevirtual

Implements C4AulFunc.

Definition at line 294 of file C4AulDefFunc.h.

References C4ScriptFnDef::RetType.

294 { return Def->RetType; }
C4ScriptFnDef * Def
Definition: C4AulDefFunc.h:287
C4V_Type RetType
Definition: C4AulDefFunc.h:278

Member Data Documentation

C4ScriptFnDef* C4AulDefFunc::Def

Definition at line 287 of file C4AulDefFunc.h.

Referenced by Exec().


The documentation for this class was generated from the following files: