35 _currentScript(0), _defaultCount(0), _paramsSpecified(0) {
67 if (signature.empty()) {
74 Signature::const_iterator s = signature.begin();
78 for (++s; s != signature.end(); ++s)
85 size_t start =
_parameters.size() - defaults.size();
87 for (
size_t i = 0; i < defaults.size(); i++, start++) {
const Signature & getSignature() const
VariableContainer & getEnvironment()
Return the script's environment variables.
std::vector< class Variable > Parameters
Object * getTriggerer() const
size_t _paramsSpecified
The number of parameters specified (not defaulted).
A class holding an UTF-8 string.
void setTriggerer(Object *obj)
Context of an NWScript function.
Object * getCaller() const
ObjectReference _triggerer
The triggering person.
void setParamsSpecified(size_t params)
An NCS, BioWare's NWN Compile Script.
size_t getParamMin() const
void setCaller(Object *obj)
NCSFile * getCurrentScript() const
size_t getParamMax() const
size_t getParamsSpecified() const
FunctionContext & operator=(const FunctionContext &ctx)
const Common::UString & getScriptName() const
std::vector< Type > Signature
const Common::UString & getName() const
void setCurrentScript(NCSFile *script=0)
VariableContainer * getCurrentEnvironment() const
Handling BioWare's NWN Compiled Scripts.
size_t _defaultCount
The number of default values.
Parameters _parameters
The function's parameters.
NCSFile * _currentScript
The script executing this function.
ObjectReference _caller
The calling object.
Variable _return
The function's return value.
void setSignature(const Signature &signature)
const Common::UString & getName() const
Signature _signature
The function's signature.
void setDefaults(const Parameters &defaults)
FunctionContext(const Common::UString &name="")
static const Common::UString kStringEmpty