OpenClonk
C4AulScriptFunc Class Reference

#include <C4AulScriptFunc.h>

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

Public Member Functions

void SetOverloaded (C4AulFunc *)
 
C4AulScriptFuncSFunc () override
 
void AddPar (const char *Idtf, C4V_Type type=C4V_Any)
 
 C4AulScriptFunc (C4PropListStatic *Parent, C4ScriptHost *pOrgScript, const char *pName, const char *Script)
 
 C4AulScriptFunc (C4PropListStatic *Parent, const C4AulScriptFunc &FromFunc)
 
 ~C4AulScriptFunc () override
 
void ParseDirectExecFunc (C4AulScriptEngine *Engine, C4AulScriptContext *context=nullptr)
 
void ParseDirectExecStatement (C4AulScriptEngine *Engine, C4AulScriptContext *context=nullptr)
 
bool GetPublic () const override
 
int GetParCount () const override
 
const C4V_TypeGetParType () const override
 
C4V_Type GetRetType () const override
 
C4Value Exec (C4PropList *p, C4Value pPars[], bool fPassErrors=false) override
 
int GetLineOfCode (C4AulBCC *bcc)
 
C4AulBCCGetCode ()
 
const char * GetName () const
 
virtual StdStrBuf GetFullName () const
 
C4Value Exec (C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
 
bool CheckParTypes (const C4Value pPars[], bool fPassErrors) const
 
void IncRef ()
 
void DecRef ()
 

Public Attributes

C4AulFuncOwnerOverloaded
 
const char * Script
 
C4ValueMapNames VarNamed
 
C4ValueMapNames ParNamed
 
C4ScriptHostpOrgScript
 
uint32_t tProfileTime
 
C4PropListStaticParent
 

Protected Member Functions

void AddBCC (C4AulBCCType eType, intptr_t=0, const char *SPos=nullptr)
 
void RemoveLastBCC ()
 
void ClearCode ()
 
int GetCodePos () const
 
C4AulBCCGetCodeByPos (int iPos)
 
C4AulBCCGetLastCode ()
 
void DumpByteCode ()
 

Protected Attributes

std::vector< C4AulBCCCode
 
std::vector< const char * > PosForCode
 
int ParCount
 
C4V_Type ParType [C4AUL_MAX_Par]
 
C4RefCntPointer< C4StringName
 
C4AulFuncMapNext
 
unsigned int RefCnt {0}
 

Friends

class C4AulCompiler
 
class C4AulParse
 
class C4ScriptHost
 

Detailed Description

Definition at line 173 of file C4AulScriptFunc.h.

Constructor & Destructor Documentation

◆ C4AulScriptFunc() [1/2]

C4AulScriptFunc::C4AulScriptFunc ( C4PropListStatic Parent,
C4ScriptHost pOrgScript,
const char *  pName,
const char *  Script 
)

Definition at line 22 of file C4AulScriptFunc.cpp.

References AB_EOFN, AddBCC(), C4V_Any, and ParType.

22  :
23  C4AulFunc(Parent, pName),
24  OwnerOverloaded(nullptr),
25  ParCount(0),
26  Script(Script),
27  pOrgScript(pOrgScript),
28  tProfileTime(0)
29 {
30  for (auto & i : ParType) i = C4V_Any;
31  AddBCC(AB_EOFN);
32 }
void AddBCC(C4AulBCCType eType, intptr_t=0, const char *SPos=nullptr)
C4V_Type ParType[C4AUL_MAX_Par]
C4ScriptHost * pOrgScript
C4AulFunc * OwnerOverloaded
C4AulFunc(C4PropListStatic *Parent, const char *pName)
Definition: C4AulFunc.cpp:22
const char * Script
Here is the call graph for this function:

◆ C4AulScriptFunc() [2/2]

C4AulScriptFunc::C4AulScriptFunc ( C4PropListStatic Parent,
const C4AulScriptFunc FromFunc 
)

Definition at line 34 of file C4AulScriptFunc.cpp.

References AB_EOFN, AddBCC(), C4AUL_MAX_Par, and ParType.

34  :
35  C4AulFunc(Parent, FromFunc.GetName()),
36  OwnerOverloaded(nullptr),
37  ParCount(FromFunc.ParCount),
38  Script(FromFunc.Script),
39  VarNamed(FromFunc.VarNamed),
40  ParNamed(FromFunc.ParNamed),
41  pOrgScript(FromFunc.pOrgScript),
42  tProfileTime(0)
43 {
44  for (int i = 0; i < C4AUL_MAX_Par; i++)
45  ParType[i] = FromFunc.ParType[i];
46  AddBCC(AB_EOFN);
47 }
void AddBCC(C4AulBCCType eType, intptr_t=0, const char *SPos=nullptr)
C4ValueMapNames ParNamed
C4V_Type ParType[C4AUL_MAX_Par]
C4ScriptHost * pOrgScript
C4AulFunc * OwnerOverloaded
const char * GetName() const
Definition: C4AulFunc.h:56
#define C4AUL_MAX_Par
Definition: C4AulFunc.h:26
C4AulFunc(C4PropListStatic *Parent, const char *pName)
Definition: C4AulFunc.cpp:22
C4ValueMapNames VarNamed
const char * Script
Here is the call graph for this function:

◆ ~C4AulScriptFunc()

C4AulScriptFunc::~C4AulScriptFunc ( )
override

Definition at line 49 of file C4AulScriptFunc.cpp.

References ClearCode(), C4RefCnt::DecRef(), and OwnerOverloaded.

50 {
52  ClearCode();
53 }
C4AulFunc * OwnerOverloaded
void DecRef()
Definition: C4StringTable.h:28
Here is the call graph for this function:

Member Function Documentation

◆ AddBCC()

void C4AulScriptFunc::AddBCC ( C4AulBCCType  eType,
intptr_t  X = 0,
const char *  SPos = nullptr 
)
protected

Definition at line 62 of file C4AulScriptFunc.cpp.

References Code, and PosForCode.

Referenced by C4AulScriptFunc().

63 {
64  // store chunk
65  Code.emplace_back(eType, X);
66  PosForCode.push_back(SPos);
67 }
std::vector< const char * > PosForCode
std::vector< C4AulBCC > Code
#define X(sdl, oc)
Here is the caller graph for this function:

◆ AddPar()

void C4AulScriptFunc::AddPar ( const char *  Idtf,
C4V_Type  type = C4V_Any 
)
inline

Definition at line 196 of file C4AulScriptFunc.h.

References C4ValueMapNames::AddName(), C4AUL_MAX_Par, and C4ValueMapNames::iSize.

Referenced by C4AulCompiler::ConstexprEvaluator::visit().

197  {
198  assert(ParCount < C4AUL_MAX_Par);
199  assert(ParCount == ParNamed.iSize);
200  ParNamed.AddName(Idtf);
201  ParType[ParCount] = type;
202  ++ParCount;
203  }
C4ValueMapNames ParNamed
C4V_Type ParType[C4AUL_MAX_Par]
int32_t AddName(const char *pnName)
Definition: C4ValueMap.cpp:429
#define C4AUL_MAX_Par
Definition: C4AulFunc.h:26
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckParTypes()

bool C4AulFunc::CheckParTypes ( const C4Value  pPars[],
bool  fPassErrors 
) const
inherited

Definition at line 58 of file C4AulFunc.cpp.

References FormatString(), GetC4VName(), C4AulScriptEngine::GetErrorHandler(), C4AulFunc::GetName(), C4AulFunc::GetParCount(), C4AulFunc::GetParType(), C4AulErrorHandler::OnError(), ScriptEngine, and C4AulError::what().

Referenced by C4AulExec::ClearPointers().

58  {
59  // Convert parameters (typecheck)
60  const C4V_Type *pTypes = GetParType();
61  int parcount = GetParCount();
62  for (int i = 0; i < parcount; i++) {
63  if (!pPars[i].CheckParConversion(pTypes[i]))
64  {
66  R"(call to "%s" parameter %d: passed %s, but expected %s)",
67  GetName(), i + 1, pPars[i].GetTypeName(), GetC4VName(pTypes[i])).getData());
68  if (fPassErrors)
69  throw e;
70  else
71  {
73  return false;
74  }
75  }
76  }
77  return true;
78 }
virtual int GetParCount() const
Definition: C4AulFunc.h:69
C4V_Type
Definition: C4Value.h:23
C4AulScriptEngine ScriptEngine
Definition: C4Globals.cpp:43
virtual const C4V_Type * GetParType() const =0
const char * GetName() const
Definition: C4AulFunc.h:56
C4AulErrorHandler * GetErrorHandler() const
Definition: C4Aul.h:173
const char * GetC4VName(const C4V_Type Type)
Definition: C4Value.cpp:32
virtual void OnError(const char *msg)=0
StdStrBuf FormatString(const char *szFmt,...)
Definition: StdBuf.cpp:270
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearCode()

void C4AulScriptFunc::ClearCode ( )
protected

Definition at line 75 of file C4AulScriptFunc.cpp.

References Code, and RemoveLastBCC().

Referenced by ~C4AulScriptFunc().

76 {
77  while(Code.size() > 0)
78  RemoveLastBCC();
79  // This function is now broken until an AddBCC call
80 }
std::vector< C4AulBCC > Code
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecRef()

void C4RefCnt::DecRef ( )
inlineinherited

Definition at line 28 of file C4StringTable.h.

References C4RefCnt::RefCnt.

Referenced by C4Command::Clear(), C4Command::CompileFunc(), C4RefCntPointer< C4String >::Get(), C4Def::GetActionByName(), C4Property::operator=(), C4RefCntPointer< C4String >::operator=(), C4Object::SetActionByName(), SetOverloaded(), ~C4AulScriptFunc(), C4Property::~C4Property(), C4RefCntPointer< C4String >::~C4RefCntPointer(), and C4ScriptGuiWindow::~C4ScriptGuiWindow().

28 { if (!--RefCnt) delete this; }
unsigned int RefCnt
Definition: C4StringTable.h:31
Here is the caller graph for this function:

◆ DumpByteCode()

void C4AulScriptFunc::DumpByteCode ( )
protected

Definition at line 609 of file C4AulParse.cpp.

References AB_COND, AB_CONDN, AB_JUMP, AB_JUMPAND, AB_JUMPNNIL, AB_JUMPOR, and DEBUG_BYTECODE_DUMP.

610 {
612  {
613  fprintf(stderr, "%s:\n", GetName());
614  std::map<C4AulBCC *, int> labels;
615  int labeln = 0;
616  for (auto & bcc: Code)
617  {
618  switch (bcc.bccType)
619  {
620  case AB_JUMP: case AB_JUMPAND: case AB_JUMPOR: case AB_JUMPNNIL: case AB_CONDN: case AB_COND:
621  labels[&bcc + bcc.Par.i] = ++labeln; break;
622  default: break;
623  }
624  }
625  for (auto & bcc: Code)
626  {
627  C4AulBCCType eType = bcc.bccType;
628  if (labels.find(&bcc) != labels.end())
629  fprintf(stderr, "%d:\n", labels[&bcc]);
630  fprintf(stderr, "\t%d\t%-20s", GetLineOfCode(&bcc), GetTTName(eType));
631  switch (eType)
632  {
633  case AB_FUNC:
634  fprintf(stderr, "\t%s\n", bcc.Par.f->GetFullName().getData()); break;
635  case AB_ERR:
636  if (bcc.Par.s)
637  case AB_CALL: case AB_CALLFS: case AB_LOCALN: case AB_LOCALN_SET: case AB_PROP: case AB_PROP_SET:
638  fprintf(stderr, "\t%s\n", bcc.Par.s->GetCStr()); break;
639  case AB_STRING:
640  {
641  const StdStrBuf &s = bcc.Par.s->GetData();
642  std::string es;
643  std::for_each(s.getData(), s.getData() + s.getLength(), [&es](char c) {
644  if (std::isgraph((unsigned char)c))
645  {
646  es += c;
647  }
648  else
649  {
650  switch (c)
651  {
652  case '\'': es.append(R"(\')"); break;
653  case '\"': es.append(R"(\")"); break;
654  case '\\': es.append(R"(\\)"); break;
655  case '\a': es.append(R"(\a)"); break;
656  case '\b': es.append(R"(\b)"); break;
657  case '\f': es.append(R"(\f)"); break;
658  case '\n': es.append(R"(\n)"); break;
659  case '\r': es.append(R"(\r)"); break;
660  case '\t': es.append(R"(\t)"); break;
661  case '\v': es.append(R"(\v)"); break;
662  default:
663  {
664  std::stringstream hex;
665  hex << R"(\x)" << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>((unsigned char)c);
666  es.append(hex.str());
667  break;
668  }
669  }
670  }
671  });
672  fprintf(stderr, "\t\"%s\"\n", es.c_str()); break;
673  }
674  case AB_DEBUG: case AB_NIL: case AB_RETURN:
675  case AB_PAR: case AB_THIS:
677  case AB_EOFN:
678  assert(!bcc.Par.X); fprintf(stderr, "\n"); break;
679  case AB_CARRAY:
680  fprintf(stderr, "\t%s\n", C4VArray(bcc.Par.a).GetDataString().getData()); break;
681  case AB_CPROPLIST:
682  fprintf(stderr, "\t%s\n", C4VPropList(bcc.Par.p).GetDataString().getData()); break;
683  case AB_JUMP: case AB_JUMPAND: case AB_JUMPOR: case AB_JUMPNNIL: case AB_CONDN: case AB_COND:
684  fprintf(stderr, "\t% -d\n", labels[&bcc + bcc.Par.i]); break;
685  default:
686  fprintf(stderr, "\t% -d\n", bcc.Par.i); break;
687  }
688  }
689  }
690 }
#define DEBUG_BYTECODE_DUMP
Definition: C4AulParse.cpp:26
StdStrBuf GetDataString(int depth=10, const class C4PropListStatic *ignore_reference_parent=nullptr) const
Definition: C4Value.cpp:131
C4AulBCCType
std::vector< C4AulBCC > Code
const char * GetName() const
Definition: C4AulFunc.h:56
int GetLineOfCode(C4AulBCC *bcc)
C4Value C4VPropList(C4PropList *p)
Definition: C4Value.h:245
C4Value C4VArray(C4ValueArray *pArray)
Definition: C4Value.h:249
const char * getData() const
Definition: StdBuf.h:442
size_t getLength() const
Definition: StdBuf.h:445
#define s

◆ Exec() [1/2]

C4Value C4AulFunc::Exec ( C4PropList p = nullptr,
C4AulParSet pPars = nullptr,
bool  fPassErrors = false 
)
inlineinherited

Definition at line 72 of file C4AulFunc.h.

References C4AulParSet::C4AulParSet(), and C4AulParSet::Par.

Referenced by C4PropList::Call(), C4Effect::CallDamage(), C4Effect::CallEffect(), C4Effect::CallStart(), C4Effect::CallStop(), C4Effect::CallTimer(), C4AulExec::ClearPointers(), C4Effect::DoCall(), C4MaterialMap::mrfScript(), C4Player::NotifyOwnedObjects(), and C4Object::PutAwayUnusedObject().

73  {
74  // Every parameter type allows conversion from nil, so no parameters are always allowed
75  if (!pPars)
76  return Exec(p, C4AulParSet().Par, fPassErrors);
77  if (!CheckParTypes(pPars->Par, fPassErrors)) return C4Value();
78  return Exec(p, pPars->Par, fPassErrors);
79  }
C4Value Par[C4AUL_MAX_Par]
Definition: C4AulFunc.h:30
bool CheckParTypes(const C4Value pPars[], bool fPassErrors) const
Definition: C4AulFunc.cpp:58
C4Value Exec(C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
Definition: C4AulFunc.h:72
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Exec() [2/2]

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

Implements C4AulFunc.

Definition at line 93 of file C4AulScriptFunc.cpp.

References AulExec, and C4AulExec::Exec().

94 {
95  return AulExec.Exec(this, p, pPars, fPassErrors);
96 }
C4Value Exec(C4AulScriptFunc *pSFunc, C4PropList *p, C4Value pPars[], bool fPassErrors)
C4AulExec AulExec
Definition: C4AulExec.cpp:29
Here is the call graph for this function:

◆ GetCode()

C4AulBCC * C4AulScriptFunc::GetCode ( )

Definition at line 87 of file C4AulScriptFunc.cpp.

References Code.

Referenced by C4AulExec::ClearPointers().

88 {
89  assert(!Code.empty());
90  return &Code[0];
91 }
std::vector< C4AulBCC > Code
Here is the caller graph for this function:

◆ GetCodeByPos()

C4AulBCC* C4AulScriptFunc::GetCodeByPos ( int  iPos)
inlineprotected

Definition at line 184 of file C4AulScriptFunc.h.

184 { return &Code[iPos]; }
std::vector< C4AulBCC > Code

◆ GetCodePos()

int C4AulScriptFunc::GetCodePos ( ) const
inlineprotected

Definition at line 183 of file C4AulScriptFunc.h.

183 { return Code.size(); }
std::vector< C4AulBCC > Code

◆ GetFullName()

StdStrBuf C4AulFunc::GetFullName ( ) const
virtualinherited

Definition at line 38 of file C4AulFunc.cpp.

References StdStrBuf::Append(), StdStrBuf::AppendChar(), C4String::GetData(), C4PropListStatic::GetDataString(), C4AulFunc::GetName(), C4AulFunc::Name, C4AulFunc::Parent, StdStrBuf::Ref(), and StdStrBuf::Take().

39 {
40  StdStrBuf r;
41  // "lost" function?
42  if (!Parent)
43  {
44  r.Ref("(unowned) ");
45  }
46  else
47  {
49  r.AppendChar('.');
50  }
51  if (GetName())
52  r.Append(Name->GetData());
53  else
54  r.Append("(unnamed)");
55  return r;
56 }
StdStrBuf GetData() const
Definition: C4StringTable.h:50
const char * GetName() const
Definition: C4AulFunc.h:56
void AppendChar(char cChar)
Definition: StdBuf.h:588
void Take(char *pnData)
Definition: StdBuf.h:457
void Append(const char *pnData, size_t iChars)
Definition: StdBuf.h:519
StdStrBuf GetDataString() const
Definition: C4PropList.cpp:253
void Ref(const char *pnData)
Definition: StdBuf.h:455
C4PropListStatic * Parent
Definition: C4AulFunc.h:55
C4RefCntPointer< C4String > Name
Definition: C4AulFunc.h:60
Here is the call graph for this function:

◆ GetLastCode()

C4AulBCC* C4AulScriptFunc::GetLastCode ( )
inlineprotected

Definition at line 185 of file C4AulScriptFunc.h.

185 { return Code.empty() ? nullptr : &Code.back(); }
std::vector< C4AulBCC > Code

◆ GetLineOfCode()

int C4AulScriptFunc::GetLineOfCode ( C4AulBCC bcc)

Definition at line 82 of file C4AulScriptFunc.cpp.

References Code, C4ScriptHost::GetScript(), pOrgScript, PosForCode, Script, and SGetLine().

Referenced by C4AulDebug::ControlScriptEvaluated(), and C4AulDebug::OnLog().

83 {
84  return SGetLine(pOrgScript ? pOrgScript->GetScript() : Script, PosForCode[bcc - &Code[0]]);
85 }
std::vector< const char * > PosForCode
const char * GetScript() const
Definition: C4ScriptHost.h:52
int SGetLine(const char *szText, const char *cpPosition)
Definition: Standard.cpp:473
std::vector< C4AulBCC > Code
C4ScriptHost * pOrgScript
const char * Script
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetName()

const char* C4AulFunc::GetName ( ) const
inlineinherited

Definition at line 56 of file C4AulFunc.h.

Referenced by C4AulFuncMap::Add(), C4AulFunc::C4AulFunc(), C4AulParseError::C4AulParseError(), C4AulFunc::CheckParTypes(), C4AulExec::ClearPointers(), C4Value::CompileFunc(), C4EditCursor::DoContextMenu(), C4AulFuncMap::GetFirstFunc(), C4AulFunc::GetFullName(), C4AulFuncMap::GetNextSNFunc(), InitCoreFunctionMap(), C4AulFuncMap::Remove(), C4ScriptHost::Warn(), and C4AulFunc::~C4AulFunc().

56 { return Name ? Name->GetCStr() : nullptr; }
const char * GetCStr() const
Definition: C4StringTable.h:49
C4RefCntPointer< C4String > Name
Definition: C4AulFunc.h:60
Here is the caller graph for this function:

◆ GetParCount()

int C4AulScriptFunc::GetParCount ( ) const
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 214 of file C4AulScriptFunc.h.

Referenced by C4AulExec::ClearPointers(), C4AulExec::GetContext(), and C4AulDebug::OnLog().

214 { return ParCount; }
Here is the caller graph for this function:

◆ GetParType()

const C4V_Type* C4AulScriptFunc::GetParType ( ) const
inlineoverridevirtual

Implements C4AulFunc.

Definition at line 215 of file C4AulScriptFunc.h.

215 { return ParType; }
C4V_Type ParType[C4AUL_MAX_Par]

◆ GetPublic()

bool C4AulScriptFunc::GetPublic ( ) const
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 213 of file C4AulScriptFunc.h.

213 { return true; }

◆ GetRetType()

C4V_Type C4AulScriptFunc::GetRetType ( ) const
inlineoverridevirtual

Implements C4AulFunc.

Definition at line 216 of file C4AulScriptFunc.h.

References C4V_Any.

216 { return C4V_Any; }

◆ IncRef()

void C4RefCnt::IncRef ( )
inlineinherited

◆ ParseDirectExecFunc()

void C4AulScriptFunc::ParseDirectExecFunc ( C4AulScriptEngine Engine,
C4AulScriptContext context = nullptr 
)

Definition at line 838 of file C4AulParse.cpp.

References C4AulCompiler::Compile(), C4AulParse::Parse_DirectExec(), and C4ScriptHost::Script.

Referenced by C4AulExec::DirectExec().

839 {
840  ClearCode();
841  // parse
842  C4AulParse state(this, context, Engine);
843  auto func = state.Parse_DirectExec(Script, true);
844  C4AulCompiler::Compile(this, func.get());
845 }
static void Compile(C4AulScriptFunc *out, const ::aul::ast::Function *f)
const char * Script
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseDirectExecStatement()

void C4AulScriptFunc::ParseDirectExecStatement ( C4AulScriptEngine Engine,
C4AulScriptContext context = nullptr 
)

Definition at line 847 of file C4AulParse.cpp.

References C4AulCompiler::Compile(), C4AulParse::Parse_DirectExec(), and C4ScriptHost::Script.

Referenced by C4AulExec::DirectExec().

848 {
849  ClearCode();
850  // parse
851  C4AulParse state(this, context, Engine);
852  auto func = state.Parse_DirectExec(Script, false);
853  C4AulCompiler::Compile(this, func.get());
854 }
static void Compile(C4AulScriptFunc *out, const ::aul::ast::Function *f)
const char * Script
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveLastBCC()

void C4AulScriptFunc::RemoveLastBCC ( )
protected

Definition at line 69 of file C4AulScriptFunc.cpp.

References Code, and PosForCode.

Referenced by ClearCode().

70 {
71  Code.pop_back();
72  PosForCode.pop_back();
73 }
std::vector< const char * > PosForCode
std::vector< C4AulBCC > Code
Here is the caller graph for this function:

◆ SetOverloaded()

void C4AulScriptFunc::SetOverloaded ( C4AulFunc f)

Definition at line 55 of file C4AulScriptFunc.cpp.

References C4RefCnt::DecRef(), C4RefCnt::IncRef(), and OwnerOverloaded.

Referenced by C4ScriptHost::CopyPropList().

56 {
58  OwnerOverloaded = f;
59  if (f) f->IncRef();
60 }
void IncRef()
Definition: C4StringTable.h:27
C4AulFunc * OwnerOverloaded
void DecRef()
Definition: C4StringTable.h:28
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SFunc()

C4AulScriptFunc* C4AulScriptFunc::SFunc ( )
inlineoverridevirtual

Reimplemented from C4AulFunc.

Definition at line 178 of file C4AulScriptFunc.h.

Referenced by C4ScriptHost::UnlinkOwnedFunctions(), and C4AulCompiler::ConstexprEvaluator::visit().

178 { return this; } // type check func...
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ C4AulCompiler

friend class C4AulCompiler
friend

Definition at line 224 of file C4AulScriptFunc.h.

◆ C4AulParse

friend class C4AulParse
friend

Definition at line 225 of file C4AulScriptFunc.h.

◆ C4ScriptHost

friend class C4ScriptHost
friend

Definition at line 226 of file C4AulScriptFunc.h.

Member Data Documentation

◆ Code

std::vector<C4AulBCC> C4AulScriptFunc::Code
protected

Definition at line 187 of file C4AulScriptFunc.h.

Referenced by AddBCC(), ClearCode(), GetCode(), GetLineOfCode(), and RemoveLastBCC().

◆ MapNext

C4AulFunc* C4AulFunc::MapNext
protectedinherited

◆ Name

C4RefCntPointer<C4String> C4AulFunc::Name
protectedinherited

◆ OwnerOverloaded

C4AulFunc* C4AulScriptFunc::OwnerOverloaded

◆ ParCount

int C4AulScriptFunc::ParCount
protected

Definition at line 189 of file C4AulScriptFunc.h.

Referenced by C4AulCompiler::ConstexprEvaluator::visit().

◆ Parent

C4PropListStatic* C4AulFunc::Parent
inherited

Definition at line 55 of file C4AulFunc.h.

Referenced by C4Value::CompileFunc(), and C4AulFunc::GetFullName().

◆ ParNamed

C4ValueMapNames C4AulScriptFunc::ParNamed

Definition at line 195 of file C4AulScriptFunc.h.

Referenced by C4AulDebug::OnLog().

◆ ParType

C4V_Type C4AulScriptFunc::ParType[C4AUL_MAX_Par]
protected

Definition at line 190 of file C4AulScriptFunc.h.

Referenced by C4AulScriptFunc().

◆ pOrgScript

◆ PosForCode

std::vector<const char *> C4AulScriptFunc::PosForCode
protected

Definition at line 188 of file C4AulScriptFunc.h.

Referenced by AddBCC(), GetLineOfCode(), and RemoveLastBCC().

◆ RefCnt

unsigned int C4RefCnt::RefCnt {0}
protectedinherited

Definition at line 31 of file C4StringTable.h.

Referenced by C4RefCnt::DecRef(), C4RefCnt::IncRef(), and C4String::~C4String().

◆ Script

const char* C4AulScriptFunc::Script

Definition at line 193 of file C4AulScriptFunc.h.

Referenced by GetLineOfCode().

◆ tProfileTime

uint32_t C4AulScriptFunc::tProfileTime

Definition at line 222 of file C4AulScriptFunc.h.

Referenced by C4AulExec::DirectExec(), and C4AulProfiler::StopProfiling().

◆ VarNamed

C4ValueMapNames C4AulScriptFunc::VarNamed

Definition at line 194 of file C4AulScriptFunc.h.

Referenced by C4AulExec::GetContext(), and C4AulDebug::OnLog().


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