本文整理汇总了C++中ARG_NUMBER函数的典型用法代码示例。如果您正苦于以下问题:C++ ARG_NUMBER函数的具体用法?C++ ARG_NUMBER怎么用?C++ ARG_NUMBER使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ARG_NUMBER函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: js_centreView
static QScriptValue js_centreView(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_EXACT(2);
ARG_NUMBER(0);
ARG_NUMBER(1);
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:7,代码来源:lint.cpp
示例2: js_safeDest
static QScriptValue js_safeDest(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(3);
ARG_NUMBER(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
return QScriptValue(true);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:8,代码来源:lint.cpp
示例3: js_setAssemblyPoint
static QScriptValue js_setAssemblyPoint(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_EXACT(3);
ARG_STRUCT(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
return QScriptValue(true);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:8,代码来源:lint.cpp
示例4: js_droidCanReach
static QScriptValue js_droidCanReach(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(3);
ARG_DROID(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
return QScriptValue(true);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:8,代码来源:lint.cpp
示例5: js_addStructure
static QScriptValue js_addStructure(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(4);
ARG_NUMBER(0);
ARG_PLAYER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
return QScriptValue(true);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:9,代码来源:lint.cpp
示例6: js_orderDroidLoc
static QScriptValue js_orderDroidLoc(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(4);
ARG_DROID(0);
ARG_ORDER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
return QScriptValue(true);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:9,代码来源:lint.cpp
示例7: js_distBetweenTwoPoints
static QScriptValue js_distBetweenTwoPoints(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_EXACT(4);
ARG_NUMBER(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
return QScriptValue(10);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:9,代码来源:lint.cpp
示例8: js_setScrollParams
static QScriptValue js_setScrollParams(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(4);
ARG_NUMBER(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:9,代码来源:lint.cpp
示例9: js_setNoGoArea
static QScriptValue js_setNoGoArea(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(5);
ARG_NUMBER(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
ARG_PLAYER(4);
return QScriptValue(true);
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:10,代码来源:lint.cpp
示例10: js_groupAddArea
static QScriptValue js_groupAddArea(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_EXACT(5);
ARG_NUMBER(0);
ARG_NUMBER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
ARG_NUMBER(4);
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:10,代码来源:lint.cpp
示例11: js_playSound
static QScriptValue js_playSound(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_VAR(1, 4);
ARG_STRING(0);
if (context->argumentCount() != 1)
{
SCRIPT_ASSERT(context, context->argumentCount() == 4, "Arguments must be either 1 or 4");
ARG_NUMBER(1);
ARG_NUMBER(2);
ARG_NUMBER(3);
}
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:13,代码来源:lint.cpp
示例12: js_setDroidExperience
static QScriptValue js_setDroidExperience(QScriptContext *context, QScriptEngine *)
{
ARG_COUNT_EXACT(2);
ARG_DROID(0);
ARG_NUMBER(1);
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:7,代码来源:lint.cpp
示例13: js_groupAddDroid
static QScriptValue js_groupAddDroid(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_EXACT(2);
ARG_NUMBER(0);
ARG_DROID(1);
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:7,代码来源:lint.cpp
示例14: js_setPower
static QScriptValue js_setPower(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_VAR(1, 2);
ARG_NUMBER(0);
if (context->argumentCount() > 1)
{
ARG_PLAYER(1);
}
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:10,代码来源:lint.cpp
示例15: js_enumGroup
static QScriptValue js_enumGroup(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_EXACT(1);
ARG_NUMBER(0);
QScriptValue result = engine->newArray(3);
for (int i = 0; i < 3; i++)
{
result.setProperty(i, convDroid(engine));
}
return result;
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:11,代码来源:lint.cpp
示例16: js_setStructureLimits
static QScriptValue js_setStructureLimits(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_VAR(2, 3);
ARG_STRING(0);
ARG_NUMBER(1);
if (context->argumentCount() > 2)
{
ARG_PLAYER(2);
}
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:11,代码来源:lint.cpp
示例17: js_queue
/// Special scripting function that registers a object-specific timer event. Note: Functions must be passed
/// quoted, otherwise they will be inlined!
static QScriptValue js_queue(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_VAR(1, 3);
ARG_STRING(0);
if (context->argumentCount() > 1) ARG_NUMBER(1);
if (context->argumentCount() == 3) ARG_OBJ(2);
QString funcName = context->argument(0).toString();
// TODO - check that a function by that name exists
// TODO - object argument
int player = engine->globalObject().property("me").toInt32();
timerNode node(engine, funcName, player);
timers.push_back(node);
return QScriptValue();
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:16,代码来源:lint.cpp
示例18: current_window_handler
static at *test_event_sub(int arg_number, at **arg_array, int remove)
{
/* Validate parameters */
at *handler = NIL;
if (arg_number == 0)
handler = current_window_handler();
else if (arg_number == 1)
handler = APOINTER(1);
else
ARG_NUMBER(-1);
/* Perform */
call_spoll();
at *r = handler ? event_get(handler, remove) : event_peek();
return r;
}
开发者ID:barak,项目名称:lush,代码行数:16,代码来源:event.c
示例19: js_enumDroid
static QScriptValue js_enumDroid(QScriptContext *context, QScriptEngine *engine)
{
ARG_COUNT_VAR(0, 3);
switch (context->argumentCount())
{
default:
case 3: ARG_PLAYER(2); // fall-through
case 2: ARG_NUMBER(1); // fall-through
case 1: ARG_PLAYER(0); break;
}
QScriptValue result = engine->newArray(3);
for (int i = 0; i < 3; i++)
{
result.setProperty(i, convDroid(engine));
}
return result;
}
开发者ID:lamyongxian,项目名称:warzone2100,代码行数:17,代码来源:lint.cpp
示例20: Nacces
static at *
Nacces(int arg_number, at **arg_array, int champ)
{
flt val = Fzero;
int numero;
ALL_ARGS_EVAL;
if (arg_number <1 || arg_number >=3)
ARG_NUMBER(-1);
numero = AINTEGER(1);
if (numero<0 || numero>=neurnombre)
error(NIL,"illegal neuron number",NEW_NUMBER(numero));
switch(arg_number) {
case 1:
val=get_Nfield(numero,champ);
break;
case 2:
val = AFLT(2);
set_Nfield(numero,champ,val);
break;
}
return NEW_NUMBER(Ftofp(val));
}
开发者ID:barak,项目名称:lush,代码行数:23,代码来源:interf.c
注:本文中的ARG_NUMBER函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论