这篇教程C++ ACTION函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ACTION函数的典型用法代码示例。如果您正苦于以下问题:C++ ACTION函数的具体用法?C++ ACTION怎么用?C++ ACTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ACTION函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: uiMenuSettimeHoursstatic QState uiMenuSettimeHours(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: lcd_buttons(LCD_BUTTONS_ALL); me->settime_YmdHM = 'H'; display_set_time(me, TRUE, TRUE); QActive_armX((QActive*)me, 1, 17); return Q_HANDLED(); case Q_TIMEOUT1_SIG: return Q_TRAN(uiMenuSettimeHoursFlash); case BUTTON_ENTER_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuSettimeMinutes); case BUTTON_UP_PRESS_SIGNAL: case BUTTON_UP_LONG_PRESS_SIGNAL: case BUTTON_UP_REPEAT_SIGNAL: ACTION(); inc_hour(&me->settime); display_set_time(me, TRUE, TRUE); QActive_armX((QActive*)me, 1, 17); return Q_HANDLED(); case BUTTON_DOWN_PRESS_SIGNAL: case BUTTON_DOWN_LONG_PRESS_SIGNAL: case BUTTON_DOWN_REPEAT_SIGNAL: ACTION(); dec_hour(&me->settime); display_set_time(me, TRUE, TRUE); QActive_armX((QActive*)me, 1, 17); return Q_HANDLED(); } return Q_SUPER(uiMenu);}
开发者ID:russells,项目名称:hc2,代码行数:33,
示例2: uiMenuCalibratestatic QState uiMenuCalibrate(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: SERIALSTR("uiMenuCalibrate/r/n"); me->temperatureWaits = 0; me->cal = BSP_get_calibration(); me->ti = INVALIDTI; show_temperature_cal(me); if (me->cal >= MAX_CAL) { lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL); } else if (me->cal <= MIN_CAL) { lcd_buttons(LCD_BUTTONS_ENTER_UP_CANCEL); } else { lcd_buttons(LCD_BUTTONS_ALL); } return Q_HANDLED(); case BUTTON_ENTER_PRESS_SIGNAL: ACTION(); SERIALSTR("b1/r/n"); set_calibration(me->cal); return Q_TRAN(uiMenuMaybeCalibrate); case BUTTON_UP_PRESS_SIGNAL: ACTION(); if (me->cal < MAX_CAL) { SERIALSTR("up/r/n"); lcd_buttons(LCD_BUTTONS_ALL); me->cal ++; if (me->cal < MAX_CAL) { lcd_buttons(LCD_BUTTONS_ALL); } else { lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL); } show_temperature_cal(me); } return Q_HANDLED(); case BUTTON_DOWN_PRESS_SIGNAL: ACTION(); if (me->cal > MIN_CAL) { SERIALSTR("down/r/n"); lcd_buttons(LCD_BUTTONS_ALL); me->cal --; if (me->cal > MIN_CAL) { lcd_buttons(LCD_BUTTONS_ALL); } else { lcd_buttons(LCD_BUTTONS_ENTER_UP_CANCEL); } show_temperature_cal(me); } return Q_HANDLED(); case Q_EXIT_SIG: /* Save this as an invalid value, so at the next tick uiGetTemperature() will be forced to update the display. */ me->ti = INVALIDTI; return Q_HANDLED(); } return Q_SUPER(uiMenu);}
开发者ID:russells,项目名称:hc2,代码行数:58,
示例3: e_cal_shell_view_memopad_actions_updatevoide_cal_shell_view_memopad_actions_update (ECalShellView *cal_shell_view){ ECalShellContent *cal_shell_content; EShellWindow *shell_window; EShellView *shell_view; EMemoTable *memo_table; GtkAction *action; GSList *list, *iter; gboolean editable = TRUE; gboolean has_url = FALSE; gboolean sensitive; gint n_selected; shell_view = E_SHELL_VIEW (cal_shell_view); shell_window = e_shell_view_get_shell_window (shell_view); cal_shell_content = cal_shell_view->priv->cal_shell_content; memo_table = e_cal_shell_content_get_memo_table (cal_shell_content); n_selected = e_table_selected_count (E_TABLE (memo_table)); list = e_memo_table_get_selected (memo_table); for (iter = list; iter != NULL; iter = iter->next) { ECalModelComponent *comp_data = iter->data; icalproperty *prop; gboolean read_only; read_only = e_client_is_readonly (E_CLIENT (comp_data->client)); editable &= !read_only; prop = icalcomponent_get_first_property ( comp_data->icalcomp, ICAL_URL_PROPERTY); has_url |= (prop != NULL); } g_slist_free (list); action = ACTION (CALENDAR_MEMOPAD_FORWARD); sensitive = (n_selected == 1); gtk_action_set_sensitive (action, sensitive); action = ACTION (CALENDAR_MEMOPAD_OPEN); sensitive = (n_selected == 1); gtk_action_set_sensitive (action, sensitive); action = ACTION (CALENDAR_MEMOPAD_OPEN_URL); sensitive = (n_selected == 1) && has_url; gtk_action_set_sensitive (action, sensitive); action = ACTION (CALENDAR_MEMOPAD_PRINT); sensitive = (n_selected == 1); gtk_action_set_sensitive (action, sensitive); action = ACTION (CALENDAR_MEMOPAD_SAVE_AS); sensitive = (n_selected == 1); gtk_action_set_sensitive (action, sensitive);}
开发者ID:Distrotech,项目名称:evolution,代码行数:57,
示例4: handle_sleepstatic void handle_sleep(struct sched_state *s){ if (ACTION(s, sleeping) && !HANDLING_INTERRUPT(s)) { lsprintf(DEV, "agent %d sleep -- ", s->cur_agent->tid); print_qs(DEV, s); printf(DEV, "/n"); agent_sleep(s); /* it doesn't quite matter where this flag gets turned off, but * there are two places where it can get woken up (wake/unsleep) * so may as well do it here. */ ACTION(s, sleeping) = false; }}
开发者ID:jinlee,项目名称:masters,代码行数:13,
示例5: ACTIONvoid moduleAdmin::actionSetup() { static const Actions actions[256] = { // 00 ACTION( "admin_Nop", a_Nop), ACTION( "admin_Nop", a_Nop), ACTION( "admin_Nop", a_Nop), ACTION( "admin_Nop", a_Nop) // 04 }; _actions = actions;}
开发者ID:segrax,项目名称:KiLLARMY,代码行数:14,
示例6: ACTIONvoid moduleAuth::actionSetup() { static const Actions actions[256] = { // 00 ACTION( "authPong", a_Pong), ACTION( "authResponseVersion", a_ResponseVersion), ACTION( "authLogin", a_Login), ACTION( "authDisconnect", a_Disconnect), // 04 ACTION( "authModulesLoad", a_ModulesLoad), }; _actions = actions;}
开发者ID:segrax,项目名称:KiLLARMY,代码行数:15,
示例7: setVerboseFlagsstatic voidsetVerboseFlags(char *str){ for (; *str; str++) { switch (*str) { case 'f': verboseLevel |= WantFullNames; break; case 'h': verboseLevel |= WantHiddenMaps; break; case 'l': verboseLevel |= WantLongListing; break; case 'p': verboseLevel |= WantPartialMaps; break; case 'R': verboseLevel |= ListRecursive; break; default: if (warningLevel > 4) { WARN1("Unknown verbose option /"%c/"/n", (unsigned int) *str); ACTION("Ignored/n"); } break; } } return;}
开发者ID:geekmaster,项目名称:buildroot-kindle,代码行数:33,
示例8: ReportBadFieldintReportBadField(const char *type, const char *field, const char *name){ ERROR("Unknown %s field %s in %s/n", type, field, name); ACTION("Ignoring assignment to unknown field in %s/n", name); return False;}
开发者ID:diegonc,项目名称:libxkbcommon,代码行数:7,
示例9: ReportShouldBeArrayintReportShouldBeArray(const char *type, const char *field, const char *name){ ERROR("Missing subscript for %s %s/n", type, field); ACTION("Ignoring illegal assignment in %s/n", name); return False;}
开发者ID:diegonc,项目名称:libxkbcommon,代码行数:7,
示例10: ReportNotArrayintReportNotArray(const char *type, const char *field, const char *name){ ERROR("The %s %s field is not an array/n", type, field); ACTION("Ignoring illegal assignment in %s/n", name); return False;}
开发者ID:diegonc,项目名称:libxkbcommon,代码行数:7,
示例11: shell_window_init_switcher_stylestatic voidshell_window_init_switcher_style (EShellWindow *shell_window){ GtkAction *action; GSettings *settings; GtkToolbarStyle style; gchar *string; settings = e_util_ref_settings ("org.gnome.evolution.shell"); action = ACTION (SWITCHER_STYLE_ICONS); string = g_settings_get_string (settings, "buttons-style"); g_object_unref (settings); if (string != NULL) { if (strcmp (string, "icons") == 0) style = GTK_TOOLBAR_ICONS; else if (strcmp (string, "text") == 0) style = GTK_TOOLBAR_TEXT; else if (strcmp (string, "both") == 0) style = GTK_TOOLBAR_BOTH_HORIZ; else style = -1; gtk_radio_action_set_current_value ( GTK_RADIO_ACTION (action), style); g_free (string); } g_signal_connect ( action, "changed", G_CALLBACK (shell_window_save_switcher_style_cb), shell_window);}
开发者ID:Distrotech,项目名称:evolution,代码行数:35,
示例12: run_action_gotostatic voidrun_action_goto(t_obj *action_obj)/* * Go to the cue specified in the action details */{ t_action * action; t_obj * next_cue_obj; /* Next cue to be run */ t_am_args * args; /* Message arguments */ action = ACTION(action_obj); next_cue_obj = action->tcue_obj; if(!next_cue_obj) { E("No Cue specified for action [%s]", action->name); return; } args = am_pool_get(); args->cue.cue_obj = next_cue_obj; client2agent_tx(QSHEET(qsheet4action(action_obj))->client, am_cue_goto, args); return;} /* run_action_goto() */
开发者ID:Prichy,项目名称:SoundDesk,代码行数:27,
示例13: uiMenustatic QState uiMenu(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: ACTION(); BSP_fast_timer_1(TRUE); BSP_fast_timer_2(TRUE); return Q_HANDLED(); case UI_ACTION_SIGNAL: SERIALSTR("U"); me->timeoutcounter = 4; lcd_timeouts(me->timeoutcounter); QActive_armX((QActive*)(me), 2, 3 * BSP_TICKS_PER_SECOND_TIMER2); return Q_HANDLED(); case Q_TIMEOUT2_SIG: me->timeoutcounter --; lcd_timeouts(me->timeoutcounter); if (me->timeoutcounter) { QActive_armX((QActive*)(me), 2, 3 * BSP_TICKS_PER_SECOND_TIMER2); return Q_HANDLED(); } else { return Q_TRAN(uiRun); } case BUTTON_CANCEL_PRESS_SIGNAL: return Q_TRAN(uiRun); case Q_EXIT_SIG: BSP_fast_timer_1(FALSE); BSP_fast_timer_2(FALSE); lcd_timeouts(0); return Q_HANDLED(); } return Q_SUPER(uiTop);}
开发者ID:russells,项目名称:hc2,代码行数:35,
示例14: ReportBadTypeintReportBadType(const char *type, const char *field, const char *name, const char *wanted){ ERROR("The %s %s field must be a %s/n", type, field, wanted); ACTION("Ignoring illegal assignment in %s/n", name); return False;}
开发者ID:diegonc,项目名称:libxkbcommon,代码行数:8,
示例15: uiMenuAdjusttimestatic QState uiMenuAdjusttime(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: SERIALSTR("uiMAT/r/n"); me->adjustment = BSP_get_adjustment(); if (me->adjustment >= MAX_ADJ) { lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL); } else if (me->adjustment <= MIN_ADJ) { lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL); } else { lcd_buttons(LCD_BUTTONS_ALL); } display_adjusttime(me); return Q_HANDLED(); case BUTTON_ENTER_PRESS_SIGNAL: ACTION(); SERIALSTR("b1/r/n"); BSP_save_adjustment(me->adjustment); return Q_TRAN(uiMenuMaybeAdjusttime); case BUTTON_UP_PRESS_SIGNAL: ACTION(); if (me->adjustment < MAX_ADJ) { SERIALSTR("up/r/n"); me->adjustment ++; lcd_buttons(LCD_BUTTONS_ALL); display_adjusttime(me); } else { lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL); } return Q_HANDLED(); case BUTTON_DOWN_PRESS_SIGNAL: ACTION(); if (me->adjustment > MIN_ADJ) { SERIALSTR("down/r/n"); me->adjustment --; lcd_buttons(LCD_BUTTONS_ALL); display_adjusttime(me); } else { lcd_buttons(LCD_BUTTONS_ENTER_UP_CANCEL); } return Q_HANDLED(); } return Q_SUPER(uiMenu);}
开发者ID:russells,项目名称:hc2,代码行数:45,
示例16: ACTIONvoid LALRTable::printTable() { auto& fout = DebugMsg::parser_dbg(); fout << "=========== LALR TABLE ==========" << endl; for (int s = 0; s < VSum; ++s) { fout << "/t" << s; } fout << endl; for (int s = 0; s < stateSum; ++s) { fout << "I" << s << ":"; for (int i = 0; i < VSum; ++i) { fout << "/t"; if (ACTION(s,i)=='a') {fout << "acc"; continue; } if (ACTION(s,i)) fout << ACTION(s,i); fout << GOTO(s,i); } fout << endl; }}
开发者ID:elite-lang,项目名称:LR_Scanner,代码行数:19,
示例17: uiMenuMaybeCalibratestatic QState uiMenuMaybeCalibrate(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: lcd_buttons(LCD_BUTTONS_ALL); lcd_showstring("CALTEMP"); return Q_HANDLED(); case BUTTON_ENTER_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuCalibrateTemperatureStart); case BUTTON_UP_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuMaybeSettime); case BUTTON_DOWN_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuMaybeAdjusttime); } return Q_SUPER(uiMenu);}
开发者ID:russells,项目名称:hc2,代码行数:19,
示例18: handle_vanishstatic void handle_vanish(struct sched_state *s){ if (ACTION(s, vanishing) && !HANDLING_INTERRUPT(s)) { lsprintf(DEV, "agent %d vanish -- ", s->cur_agent->tid); print_qs(DEV, s); printf(DEV, "/n"); agent_vanish(s); /* the vanishing flag stays on (TODO: is it needed?) */ }}
开发者ID:jinlee,项目名称:masters,代码行数:10,
示例19: handle_forkstatic bool handle_fork(struct sched_state *s, int target_tid, bool add_to_rq){ if (ACTION(s, forking) && !HANDLING_INTERRUPT(s) && s->cur_agent->tid != target_tid) { lsprintf(DEV, "agent %d forked (%s) -- ", target_tid, add_to_rq ? "rq" : "dq"); print_qs(DEV, s); printf(DEV, "/n"); /* Start all newly-forked threads not in the context switcher. * The free pass gets them out of the first assertion on the * cs state flag. Of note, this means we can't reliably use the * cs state flag for anything other than assertions. */ agent_fork(s, target_tid, add_to_rq); /* don't need this flag anymore; fork only forks once */ ACTION(s, forking) = false; return true; } else { return false; }}
开发者ID:jinlee,项目名称:masters,代码行数:20,
示例20: uiMenuMaybeSettimestatic QState uiMenuMaybeSettime(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: lcd_buttons(LCD_BUTTONS_ENTER_DOWN_CANCEL); lcd_showstring("SETTIME"); return Q_HANDLED(); case BUTTON_ENTER_PRESS_SIGNAL: ACTION(); me->settime = *gettimep(); return Q_TRAN(uiMenuSettimeYears); case BUTTON_UP_PRESS_SIGNAL: ACTION(); return Q_HANDLED(); case BUTTON_DOWN_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuMaybeCalibrate); } return Q_SUPER(uiMenu);}
开发者ID:russells,项目名称:hc2,代码行数:20,
示例21: action_save_cbstatic voidaction_save_cb (GtkAction *action, EMsgComposer *composer){ EHTMLEditor *editor; EHTMLEditorView *view; const gchar *filename; gint fd; GError *error = NULL; editor = e_msg_composer_get_editor (composer); filename = e_html_editor_get_filename (editor); if (filename == NULL) { gtk_action_activate (ACTION (SAVE_AS)); return; } /* Check if the file already exists and we can create it. */ fd = g_open (filename, O_RDONLY | O_CREAT | O_EXCL, 0777); if (fd < 0) { gint errno_saved = errno; if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { gint response; response = e_alert_run_dialog_for_args ( GTK_WINDOW (composer), E_ALERT_ASK_FILE_EXISTS_OVERWRITE, filename, NULL); if (response != GTK_RESPONSE_OK) return; } else { e_alert_submit ( E_ALERT_SINK (composer), E_ALERT_NO_SAVE_FILE, filename, g_strerror (errno_saved), NULL); return; } } else close (fd); if (!e_html_editor_save (editor, filename, TRUE, &error)) { e_alert_submit ( E_ALERT_SINK (composer), E_ALERT_NO_SAVE_FILE, filename, error->message, NULL); g_error_free (error); return; } view = e_html_editor_get_view (editor); e_html_editor_view_set_changed (view, TRUE);}
开发者ID:lantw44,项目名称:gsoc2013-evolution,代码行数:53,
示例22: ACTIONstd::ostream &OCamlTabCodeGen::TO_STATE_ACTION_SWITCH(){ /* Walk the list of functions, printing the cases. */ for ( GenActionList::Iter act = actionList; act.lte(); act++ ) { /* Write out referenced actions. */ if ( act->numToStateRefs > 0 ) { /* Write the case label, the action and the case break. */ out << "/t| " << act->actionId << " ->/n"; ACTION( out, act, 0, false ); } } genLineDirective( out ); return out;}
开发者ID:jeromemaloberti,项目名称:ragel,代码行数:15,
示例23: uiMenuMaybeAdjusttimestatic QState uiMenuMaybeAdjusttime(struct UI *me){ switch (Q_SIG(me)) { case Q_ENTRY_SIG: lcd_buttons(LCD_BUTTONS_ENTER_UP_CANCEL); lcd_showstring("ADJTIME"); me->assertionMenuCounter = 0; return Q_HANDLED(); case BUTTON_ENTER_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuAdjusttime); case BUTTON_UP_PRESS_SIGNAL: ACTION(); return Q_TRAN(uiMenuMaybeCalibrate); case BUTTON_DOWN_PRESS_SIGNAL: ACTION(); me->assertionMenuCounter ++; if (me->assertionMenuCounter >= 7) { return Q_TRAN(uiMenuShowAssertion); } return Q_HANDLED(); } return Q_SUPER(uiMenu);}
开发者ID:russells,项目名称:hc2,代码行数:24,
示例24: settingsvoid ToolBarEditor::populateActionList(bool reset){ QStringList names = ActionManager::instance()->toolBarActionNames(); if(!reset) { QSettings settings (Qmmp::configFile(), QSettings::IniFormat); names = settings.value("Simple/toolbar_actions", names).toStringList(); } for(int id = ActionManager::PLAY; id <= ActionManager::QUIT; ++id) { QAction *action = ACTION(id); if(action->icon().isNull()) continue; QListWidgetItem *item = new QListWidgetItem(); item->setIcon(action->icon()); item->setText(action->text().replace("&", "")); item->setData(Qt::UserRole, action->objectName()); if(!names.contains(action->objectName())) m_ui->actionsListWidget->addItem(item); } { QListWidgetItem *item = new QListWidgetItem(); item->setText("-- " + tr("Separator") + " --"); item->setData(Qt::UserRole, "separator"); m_ui->actionsListWidget->addItem(item); } foreach (QString name, names) { QAction *action = ActionManager::instance()->findChild<QAction *>(name); if(action) { QListWidgetItem *item = new QListWidgetItem(); item->setIcon(action->icon()); item->setText(action->text().replace("&", "")); item->setData(Qt::UserRole, action->objectName()); m_ui->activeActionsListWidget->addItem(item); } else if(name == "separator") { QListWidgetItem *item = new QListWidgetItem(); item->setText("-- " + tr("Separator") + " --"); item->setData(Qt::UserRole, "separator"); m_ui->activeActionsListWidget->addItem(item); } }
开发者ID:Greedysky,项目名称:qmmp,代码行数:48,
示例25: sprintfvoid GUI::ParseDefinitionElem(struct GUI_DEFINITION_ELEM* guielem){ char output[256]; sprintf(output, "DEBUG: Beginning parsing gui definition element: %s", guielem->name); LogToFile(DEFAULT_GUI_LOG_NAME, output); static int exist = 0; GUIcontrol* chk = ItemByName(guielem->name); if(chk) { exist++; sprintf(guielem->name, "%s%u", guielem->name, exist); } GUIcontrol* new_ctrl = NULL; new_ctrl = new GUIcontrol(guielem->name); new_ctrl->SetPos(guielem->x, guielem->y); new_ctrl->SetPatternCount(guielem->pattern_count); new_ctrl->SetPatternWidth(guielem->pattern_width); new_ctrl->SetPatternHeight(guielem->pattern_height); new_ctrl->SetCurrentPattern(guielem->pattern_current); new_ctrl->SetVisible(guielem->visible); new_ctrl->SetTexture(TextureByName(textures, guielem->texture_name)); new_ctrl->SetColor(guielem->color_red, guielem->color_green, guielem->color_blue, guielem->color_alpha); new_ctrl->SetCaption(guielem->caption); new_ctrl->SetCaptionFont(FontByName(fonts, guielem->caption_font_name)); new_ctrl->SetCaptionColor(guielem->caption_color_red, guielem->caption_color_green, guielem->caption_color_blue, guielem->caption_color_alpha); new_ctrl->SetCaptionPos(guielem->caption_x, guielem->caption_y); new_ctrl->SetText(guielem->text); new_ctrl->SetTextFont(FontByName(fonts, guielem->text_font_name)); new_ctrl->SetTextColor(guielem->text_color_red, guielem->text_color_green, guielem->text_color_blue, guielem->text_color_alpha); new_ctrl->SetTextPos(guielem->text_x, guielem->text_y); new_ctrl->SetAction(ACTION(guielem->action)); new_ctrl->SetNextName(guielem->next); new_ctrl->SetParentName(guielem->parent); new_ctrl->SetData(guielem->data); new_ctrl->SetGroup(GROUP(guielem->group)); AddControl(new_ctrl); sprintf(output, "DEBUG: Finished parsing gui definition element: %s", guielem->name); LogToFile(DEFAULT_GUI_LOG_NAME, output);};
开发者ID:lightsgoout,项目名称:interview,代码行数:48,
示例26: ACTIONstd::wostream &CSharpGotoCodeGen::EOF_ACTION_SWITCH(){ /* Walk the list of functions, printing the cases. */ for ( GenActionList::Iter act = actionList; act.lte(); act++ ) { /* Write out referenced actions. */ if ( act->numEofRefs > 0 ) { /* Write the case label, the action and the case break. */ out << L"/tcase " << act->actionId << L":/n"; ACTION( out, act, 0, true ); out << L"/tbreak;/n"; } } genLineDirective( out ); return out;}
开发者ID:lazyWombat,项目名称:VSRagel,代码行数:16,
示例27: ACTIONstd::ostream &TabCodeGen::ACTION_SWITCH(){ /* Walk the list of functions, printing the cases. */ for ( GenActionList::Iter act = actionList; act.lte(); act++ ) { /* Write out referenced actions. */ if ( act->numTransRefs > 0 ) { /* Write the case label, the action and the case break. */ out << "/tcase " << act->actionId << ":/n"; ACTION( out, act, 0, false, false ); out << "/tbreak;/n"; } } genLineDirective( out ); return out;}
开发者ID:Orvid,项目名称:hhvm-third-party,代码行数:16,
示例28: ACTIONstd::wostream &FGotoCodeGen::EXEC_ACTIONS(){ /* Loop the actions. */ for ( GenActionTableMap::Iter redAct = redFsm->actionMap; redAct.lte(); redAct++ ) { if ( redAct->numTransRefs > 0 ) { /* We are at the start of a glob, write the case. */ out << L"f" << redAct->actListId << L":/n"; /* Write each action in the list of action items. */ for ( GenActionTable::Iter item = redAct->key; item.lte(); item++ ) ACTION( out, item->value, 0, false, false ); out << L"/tgoto _again;/n"; } } return out;}
开发者ID:lazyWombat,项目名称:VSRagel,代码行数:17,
注:本文中的ACTION函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AC_MEMCPY函数代码示例 C++ ACS_TRACE函数代码示例 |