C4AulDefFunc Class Reference

#include <C4AulDefFunc.h>

Inheritance diagram for C4AulDefFunc:
Collaboration diagram for C4AulDefFunc:

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


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

C4RefCntPointer< C4StringName
unsigned int RefCnt {0}

Detailed Description

Definition at line 284 of file C4AulDefFunc.h.

Constructor & Destructor Documentation

◆ C4AulDefFunc()

C4AulDefFunc::C4AulDefFunc ( C4PropListStatic Parent,
C4ScriptFnDef pDef 

Definition at line 111 of file C4Script.cpp.

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

Referenced by InitCoreFunctionMap().

111  :
112  C4AulFunc(Parent, pDef->Identifier), Def(pDef)
113 {
114  Parent->SetPropertyByS(Name, C4VFunction(this));
115 }
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:971
C4RefCntPointer< C4String > Name
Definition: C4AulFunc.h:60
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~C4AulDefFunc()

C4AulDefFunc::~C4AulDefFunc ( )

Referenced by C4AulDefFunc().

Here is the caller graph for this function:

Member Function Documentation

◆ Exec()

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

Implements C4AulFunc.

Definition at line 119 of file C4Script.cpp.

References Def, and C4ScriptFnDef::FunctionC4V.

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

◆ GetParType()

const C4V_Type* C4AulDefFunc::GetParType ( ) const

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

◆ GetPublic()

bool C4AulDefFunc::GetPublic ( ) const

Reimplemented from C4AulFunc.

Definition at line 292 of file C4AulDefFunc.h.

References C4ScriptFnDef::Public.

292 { return !!Def->Public; }
C4ScriptFnDef * Def
Definition: C4AulDefFunc.h:287

◆ GetRetType()

C4V_Type C4AulDefFunc::GetRetType ( ) const

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

◆ Def

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: