本文整理汇总了C++中GET_STATE函数的典型用法代码示例。如果您正苦于以下问题:C++ GET_STATE函数的具体用法?C++ GET_STATE怎么用?C++ GET_STATE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GET_STATE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
{
if(ui.label_deathOverlay->isHidden())
{
ui.label_deathOverlay->show();
ui.frame_top->hide();
ui.label_aim->hide();
ui.label_firingMode->hide();
ui.frame_bottom->hide();
schedulingHud.hide();
ui.progressBar_health->hide();
ui.progressBar_ammo->hide();
}
}
else
{
if(!ui.label_deathOverlay->isHidden())
{
ui.label_deathOverlay->hide();
ui.frame_top->show();
ui.label_aim->show();
ui.label_firingMode->show();
ui.frame_bottom->show();
schedulingHud.show();
}
}
//
// Update Scoreboard
//
scoreboard.refresh();
if(ptr_player->detectedAsDead || GET_STATE() == STATE_GAMEOVER || ptr_player->showScoreboard)
{
if(ptr_player->showScoreboard)
scoreboardFade = 0.0f;
// Show scoreboard if delay has expired
if(scoreboardFade > 0.0f)
scoreboardFade -= SETTINGS->trueDeltaTime;
if(scoreboardFade <= 0.0f)
{
// Show scoreboard if hidden
if(ui.frame_scoreboard->isHidden())
{
hudMessage_manager.silenceAllMessages();
ui.frame_scoreboard->show();
ptr_player->isScoreBoardVisible = true;
// Hide aim
if(!ui.label_aim->isHidden())
{
ui.label_aim->hide();
ui.label_firingMode->hide();
}
}
}
}
else
{
// Reset scoreboard timer
scoreboardFade = 2.0f;
// Hide scoreboard if shown
if(!ui.frame_scoreboard->isHidden())
示例2: GET_STATE
void sc_generator::push_state(bool is_system)
{
state->push_back(real_gen_state());
GET_STATE().system_context = is_system;
}
示例3: initng_depend_stop_dep_met
/*
* This will check with plug-ins if dependencies for stop is met.
* If this returns FALSE deps for stopping are not met, try again later.
* If this returns FAIL stop deps, wont EVER be met, stop trying.
*/
int initng_depend_stop_dep_met(active_db_h * service, int verbose)
{
active_db_h *currentA = NULL;
int count = 0;
assert(service);
/*
* Check so all deps, that needs service, is down.
* if there are services depending on this one still running,
* return false and still try.
*/
while_active_db(currentA) {
count++;
if (service->depend_cache >= count)
continue;
/* temporary increase depend_cache - will degrese before
* reutrn (FALSE) */
service->depend_cache++;
if (currentA == service)
continue;
/* Does service depends on current ?? */
if (initng_depend(currentA, service) == FALSE)
continue;
switch (GET_STATE(currentA)) {
/* if its done, this is perfect */
case IS_DOWN:
continue;
/* If the dep is failed, continue */
case IS_FAILED:
continue;
/* BIG TODO.
* This is not correct, but if we wait for a service that is
* starting to stop, and that service is waiting for this
* service to start, until it starts, makes a deadlock.
*
* Asuming that STARTING services WAITING_FOR_START_DEP are
* down for now.
*/
case IS_STARTING:
if (strstr(currentA->current_state->name,
"WAITING_FOR_START_DEP"))
continue;
break;
}
#ifdef DEBUG
/* else RETURN */
if (verbose)
D_("still waiting for service %s state %s\n",
currentA->name, currentA->current_state->name);
else
D_("still waiting for service %s state %s\n",
currentA->name, currentA->current_state->name);
#endif
/* no, the dependency are not met YET */
service->depend_cache--;
return FALSE;
}
/* run the global module dep check */
{
s_event event;
event.event_type = &EVENT_STOP_DEP_MET;
event.data = service;
initng_event_send(&event);
if (event.status == FAILED) {
if (verbose) {
F_("Service %s can not be started because a "
"module (START_DEP_MET) says so.\n",
service->name);
}
return FALSE;
}
}
service->depend_cache = 0;
return TRUE;
}
示例4: cState_allow_nan_p
/*
* call-seq: allow_nan?
*
* Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise
* returns false.
*/
static VALUE cState_allow_nan_p(VALUE self)
{
GET_STATE(self);
return state->allow_nan ? Qtrue : Qfalse;
}
示例5: cState_remember
/*
* call-seq: remember(object)
*
* Remember _object_, to find out if it was already encountered (if a cyclic
* data structure is rendered).
*/
static VALUE cState_remember(VALUE self, VALUE object)
{
GET_STATE(self);
return rb_hash_aset(state->seen, rb_obj_id(object), Qtrue);
}
示例6: cState_array_nl
/*
* call-seq: array_nl()
*
* This string is put at the end of a line that holds a JSON array.
*/
static VALUE cState_array_nl(VALUE self)
{
GET_STATE(self);
return state->array_nl;
}
示例7: cState_check_circular_p
/*
* call-seq: check_circular?
*
* Returns true, if circular data structures should be checked,
* otherwise returns false.
*/
static VALUE cState_check_circular_p(VALUE self)
{
GET_STATE(self);
return state->check_circular ? Qtrue : Qfalse;
}
示例8: cState_quirks_mode_set
/*
* call-seq: quirks_mode=(enable)
*
* If set to true, enables the quirks_mode mode.
*/
static VALUE cState_quirks_mode_set(VALUE self, VALUE enable)
{
GET_STATE(self);
state->quirks_mode = RTEST(enable);
return Qnil;
}
示例9: cState_depth
/*
* call-seq: depth
*
* This integer returns the current depth of data structure nesting.
*/
static VALUE cState_depth(VALUE self)
{
GET_STATE(self);
return LONG2FIX(state->depth);
}
示例10: cState_ascii_only_p
/*
* call-seq: ascii_only?
*
* Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise
* returns false.
*/
static VALUE cState_ascii_only_p(VALUE self)
{
GET_STATE(self);
return state->ascii_only ? Qtrue : Qfalse;
}
示例11: cState_quirks_mode_p
/*
* call-seq: quirks_mode?
*
* Returns true, if quirks mode is enabled. Otherwise returns false.
*/
static VALUE cState_quirks_mode_p(VALUE self)
{
GET_STATE(self);
return state->quirks_mode ? Qtrue : Qfalse;
}
示例12: cState_max_nesting_set
/*
* call-seq: max_nesting=(depth)
*
* This sets the maximum level of data structure nesting in the generated JSON
* to the integer depth, max_nesting = 0 if no maximum should be checked.
*/
static VALUE cState_max_nesting_set(VALUE self, VALUE depth)
{
GET_STATE(self);
Check_Type(depth, T_FIXNUM);
return state->max_nesting = FIX2LONG(depth);
}
示例13: cState_array_nl
/*
* call-seq: array_nl()
*
* This string is put at the end of a line that holds a JSON array.
*/
static VALUE cState_array_nl(VALUE self)
{
GET_STATE(self);
return state->array_nl ? rb_str_new(state->array_nl, state->array_nl_len) : rb_str_new2("");
}
示例14: cState_space_before
/*
* call-seq: space_before()
*
* This string is used to insert a space before the ':' in JSON objects.
*/
static VALUE cState_space_before(VALUE self)
{
GET_STATE(self);
return state->space_before ? rb_str_new(state->space_before, state->space_before_len) : rb_str_new2("");
}
示例15: cState_object_nl
/*
* call-seq: object_nl()
*
* This string is put at the end of a line that holds a JSON object (or
* Hash).
*/
static VALUE cState_object_nl(VALUE self)
{
GET_STATE(self);
return state->object_nl;
}