亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? package.cxx

?? 移植到WLIT項目的redboot源代碼
?? CXX
?? 第 1 頁 / 共 2 頁
字號:
//{{{  Banner                           //============================================================================////     package.cxx////     Implementation of the CdlPackage class////============================================================================//####COPYRIGHTBEGIN####//                                                                          // ----------------------------------------------------------------------------// Copyright (C) 1999, 2000 Red Hat, Inc.//// This file is part of the eCos host tools.//// This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the Free // Software Foundation; either version 2 of the License, or (at your option) // any later version.// // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for // more details.// // You should have received a copy of the GNU General Public License along with// this program; if not, write to the Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.//// ----------------------------------------------------------------------------//                                                                          //####COPYRIGHTEND####//============================================================================//#####DESCRIPTIONBEGIN####//// Author(s):   bartv// Contact(s):  bartv// Date:        1999/03/01// Version:     0.02////####DESCRIPTIONEND####//============================================================================//}}}//{{{  #include's                       // ----------------------------------------------------------------------------#include "cdlconfig.h"// Get the infrastructure types, assertions, tracing and similar// facilities.#include <cyg/infra/cyg_ass.h>#include <cyg/infra/cyg_trac.h>// <cdl.hxx> defines everything implemented in this module.// It implicitly supplies <string>, <vector> and <map> because// the class definitions rely on these headers.#include <cdl.hxx>//}}}//{{{  Statics                          // ----------------------------------------------------------------------------CYGDBG_DEFINE_MEMLEAK_COUNTER(CdlPackageBody);//}}}//{{{  Constructor                      // ----------------------------------------------------------------------------// Constructor. The real work is actually done in the base classes// and the parser.CdlPackageBody::CdlPackageBody(std::string name_arg, CdlConfiguration toplevel, std::string dir)    : CdlNodeBody(name_arg),      CdlContainerBody(),      CdlUserVisibleBody(),      CdlValuableBody(CdlValueFlavor_BoolData),      CdlParentableBody(),      CdlBuildableBody(),      CdlDefinableBody(),      CdlLoadableBody(toplevel, dir),      CdlBuildLoadableBody(),      CdlDefineLoadableBody(){    CYG_REPORT_FUNCNAME("CdlPackageBody:: constructor");    CYG_REPORT_FUNCARG1XV(this);    loaded_for_template   = false;    loaded_for_hardware   = false;    cdlpackagebody_cookie = CdlPackageBody_Magic;    CYGDBG_MEMLEAK_CONSTRUCTOR();        CYG_POSTCONDITION_THISC();    CYG_REPORT_RETURN();}//}}}//{{{  Destructor                       // ----------------------------------------------------------------------------// Most of the work is done in the base classes.CdlPackageBody::~CdlPackageBody(){    CYG_REPORT_FUNCNAME("CdlPackageBody:: destructor");    CYG_REPORT_FUNCARG1XV(this);    CYG_PRECONDITION_THISC();    loaded_for_template   = false;    loaded_for_hardware   = false;    cdlpackagebody_cookie = CdlPackageBody_Invalid;    CYGDBG_MEMLEAK_DESTRUCTOR();        CYG_REPORT_RETURN();}//}}}//{{{  parse_package()                  // ----------------------------------------------------------------------------// Parsing a package definition. This routine gets invoked directly from the// Tcl interpreter, when the cdl_package command is encountered. The// command takes two arguments, a name and a body of properties, and there// should only be one cdl_package command per package.//// At the point that the cdl_package command is executed the CdlPackage// object should already exist, and in fact it should be the current// interpreter's loadable. Obviously the name should be checked. The// main purpose of the cdl_package command is to fill in some extra// information in the form of properties.//// A package is a buildable, valuable, uservisible, ... object so it// inherits properties from all three. In practice some of the// properties from the base classes are not actually legal, but that// will be caught by the validation code. Additional properties// relevant to a package are: parent, license_proc, install_proc, and// wizard. It is harmless (but unnecessary) to allow components etc.// to be defined inside a package definition.intCdlPackageBody::parse_package(CdlInterpreter interp, int argc, char** argv){    CYG_REPORT_FUNCNAMETYPE("CdlPackageBody::parse_package", "result %d");    CYG_REPORT_FUNCARG1("argc %d", argc);    CYG_PRECONDITION_CLASSC(interp);        std::string  diag_argv0      = CdlParse::get_tcl_cmd_name(argv[0]);    CdlLoadable  loadable       = interp->get_loadable();    CdlPackage   package        = dynamic_cast<CdlPackage>(loadable);    CdlContainer parent         = package->get_parent();           CdlToplevel  toplevel       = interp->get_toplevel();    std::string filename        = interp->get_context();     CYG_ASSERT_CLASSC(loadable);        // There should always be a loadable during parsing    CYG_ASSERT_CLASSC(package);         // And packages are the only loadable for software CDL    CYG_ASSERT_CLASSC(toplevel);    CYG_ASSERTC(dynamic_cast<CdlToplevel>(parent) == toplevel);    // The package cannot have been reparented yet.    CYG_ASSERTC("" != filename);    CYG_UNUSED_PARAM(CdlContainer, parent);    CYG_UNUSED_PARAM(CdlToplevel, toplevel);    // There should be no current node, in fact the cdl_package command    // can only exist at the toplevel of the original script courtesy    // of commands being pushed and popped.    CYG_ASSERTC(0 == interp->get_node());        // Also, the package should be the current container.    CYG_ASSERTC(package == dynamic_cast<CdlPackage>(interp->get_container()));        // Declare these outside the scope of the try statement, to allow    // goto calls for the error handling.    const std::vector<CdlProperty>& properties = package->get_properties();    CdlInterpreterBody::NodeSupport interp_node(interp, package);    static CdlInterpreterCommandEntry commands[] =    {        CdlInterpreterCommandEntry("hardware",           &parse_hardware                    ),        CdlInterpreterCommandEntry("license_proc",       &parse_license_proc                ),        CdlInterpreterCommandEntry("install_proc",       &parse_install_proc                ),        CdlInterpreterCommandEntry("cdl_component",      &CdlComponentBody::parse_component ),        CdlInterpreterCommandEntry("cdl_option",         &CdlOptionBody::parse_option       ),        CdlInterpreterCommandEntry("cdl_interface",      &CdlInterfaceBody::parse_interface ),        CdlInterpreterCommandEntry("cdl_dialog",         &CdlDialogBody::parse_dialog       ),        CdlInterpreterCommandEntry("cdl_wizard",         &CdlWizardBody::parse_wizard       ),        CdlInterpreterCommandEntry("",                   0                                  )    };    std::vector<CdlInterpreterCommandEntry>  new_commands;    int i;        // All parsing errors may result in an exception, under the control of    // application code. This exception must not pass through the Tcl interpreter.    int result = TCL_OK;    try {        // Currently there are no options. This may change in future.        if (3 != argc) {            CdlParse::report_error(interp, "",                                   std::string("Incorrect number of arguments to `") + diag_argv0 +                                   "'\nExpecting name and properties list.");        } else if (argv[1] != loadable->get_name()) {            CdlParse::report_error(interp, "",                                   std::string("Incorrect package name in CDL script.\n") +                                   "This package is `" + loadable->get_name() + "'\n" +                                   "The CDL script `" + filename + "' defines a package `" + argv[1] + "'.");        } else if (0 != properties.size()) {            CdlParse::report_error(interp, "",                                   std::string("Duplicate cdl_package commands for package `") + argv[1] + "'.");        } else if (!Tcl_CommandComplete(argv[2])) {            CdlParse::report_error(interp, "",                                   std::string("Invalid property list for cdl_package `") + argv[1] + "'.");        } else {            for (i = 0; 0 != commands[i].command; i++) {                new_commands.push_back(commands[i]);            }                    CdlBuildLoadableBody::add_property_parsers(new_commands);            CdlBuildableBody::add_property_parsers(new_commands);            CdlDefineLoadableBody::add_property_parsers(new_commands);            CdlDefinableBody::add_property_parsers(new_commands);            CdlParentableBody::add_property_parsers(new_commands);            CdlValuableBody::add_property_parsers(new_commands);            CdlUserVisibleBody::add_property_parsers(new_commands);            CdlNodeBody::add_property_parsers(new_commands);            // Now evaluate the body. If an error occurs then typically            // this will be reported via CdlParse::report_error(),            // but any exceptions will have been intercepted and            // turned into a Tcl error.            CdlInterpreterBody::CommandSupport interp_cmds(interp, new_commands);            result = interp->eval(argv[2]);            if (TCL_OK == result) {                // Even if there were errors, they were not fatal. There may                // now be a number of properties for this package, and some                // validation should take place. Start with the base classes.                package->CdlNodeBody::check_properties(interp);                package->CdlUserVisibleBody::check_properties(interp);                package->CdlValuableBody::check_properties(interp);                package->CdlParentableBody::check_properties(interp);                package->CdlBuildableBody::check_properties(interp);                package->CdlBuildLoadableBody::check_properties(interp);                package->CdlDefinableBody::check_properties(interp);                package->CdlDefineLoadableBody::check_properties(interp);                // Some of the properties in the base classes are not actually                // appropriate. A package is valuable, but it can only be                // modified by loading and unloading. Many of the value-related                // properties do not make sense.                if (package->count_properties(CdlPropertyId_Flavor) > 0) {                    CdlParse::report_error(interp, "", "A package should not have a `flavor' property.");                }                if (package->count_properties(CdlPropertyId_EntryProc) > 0) {                    CdlParse::report_error(interp, "", "A package should not have an `entry_proc' property.");                }                if (package->count_properties(CdlPropertyId_CheckProc) > 0) {                    CdlParse::report_error(interp, "", "A package should not have a `check_proc' property.");                }                // BLV: this reasoning is faulty, it should be possible to                // control the enabled aspect via an expression. That would                // need option processing for the default_value property.                if (package->count_properties(CdlPropertyId_DefaultValue) > 0) {                    CdlParse::report_error(interp, "", "A package should not have a `default_value' property.");                }                if (package->count_properties(CdlPropertyId_LegalValues) > 0) {                    CdlParse::report_error(interp, "", "A package should not have a `legal_values' property.");                }                if (package->count_properties(CdlPropertyId_Calculated) > 0) {                    CdlParse::report_error(interp, "", "A package should not have a `calculated' property.");                }                if (package->count_properties(CdlPropertyId_Dialog) > 0) {                    CdlParse::report_error(interp, "", "A package should not have a `dialog' property.");                }                // There should be at most one each of license_proc, install_proc, include_dir,                // export_to, library, makefile, and wizard.                if (package->count_properties(CdlPropertyId_LicenseProc) > 1) {                    CdlParse::report_error(interp, "", "A package should have at most one `license_proc' property.");                }                if (package->count_properties(CdlPropertyId_InstallProc) > 1) {                    CdlParse::report_error(interp, "", "A package should have at most one `install_proc' property.");                }            }        }            } catch (std::bad_alloc e) {        // Errors at this stage should be reported via Tcl, not via C++        interp->set_result(CdlParse::construct_diagnostic(interp, "internal error", "", "Out of memory"));        result = TCL_ERROR;    } catch (CdlParseException e) {        interp->set_result(e.get_message());        result = TCL_ERROR;    } catch(...) {        interp->set_result(CdlParse::construct_diagnostic(interp, "internal error", "", "Unexpected C++ exception"));        result = TCL_ERROR;    }        CYG_REPORT_RETVAL(result);    return result;}//}}}//{{{  Package properties               // ----------------------------------------------------------------------------// Syntax: hardwareintCdlPackageBody::parse_hardware(CdlInterpreter interp, int argc, char** argv){    CYG_REPORT_FUNCNAMETYPE("parse_hardware", "result %d");    int result = CdlParse::parse_minimal_property(interp, argc, argv, CdlPropertyId_Hardware, 0, 0);        CYG_REPORT_RETVAL(result);    return result;}// ----------------------------------------------------------------------------// Syntax: install_proc <tclcode>intCdlPackageBody::parse_install_proc(CdlInterpreter interp, int argc, char** argv){    CYG_REPORT_FUNCNAMETYPE("parse_install_proc", "result %d");    int result = CdlParse::parse_tclcode_property(interp, argc, argv, CdlPropertyId_InstallProc, 0, 0);        CYG_REPORT_RETVAL(result);    return result;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一级高清毛片| 日韩av在线播放中文字幕| 国产精品美女久久久久久久久 | 国产精品久久久久7777按摩| 国产日韩欧美精品综合| 欧美国产日韩a欧美在线观看 | 精品国产乱码久久久久久浪潮| 678五月天丁香亚洲综合网| 欧美高清精品3d| 日韩一级完整毛片| 久久女同精品一区二区| 综合av第一页| 亚洲精品福利视频网站| 视频一区二区中文字幕| 精品一区二区三区av| 成人免费视频视频在线观看免费| 波多野结衣中文一区| 国产成人亚洲综合a∨婷婷图片| 成人免费视频一区| 欧美少妇bbb| 日韩欧美高清dvd碟片| 亚洲国产高清不卡| 亚洲综合成人在线视频| 亚洲第一电影网| 精品午夜久久福利影院| eeuss鲁一区二区三区| 欧美亚洲国产怡红院影院| 91精品国产色综合久久不卡蜜臀| 欧美成人精品高清在线播放| 亚洲国产精品成人综合色在线婷婷| 一区二区三区在线看| 蜜臀av在线播放一区二区三区| 国产精品一二三区在线| gogo大胆日本视频一区| 在线观看91精品国产麻豆| 久久色中文字幕| 亚洲黄色免费电影| 久久se精品一区精品二区| av不卡一区二区三区| 8x福利精品第一导航| 国产欧美视频一区二区| 亚洲成人在线免费| 国产91精品在线观看| 欧美剧情片在线观看| 精品国产91乱码一区二区三区| 亚洲免费观看高清完整版在线观看熊 | 国产高清在线精品| 欧美午夜精品电影| 国产女人水真多18毛片18精品视频| 一区二区三区国产| 国产盗摄一区二区| 欧美精品第1页| 国产精品色噜噜| 美女被吸乳得到大胸91| 色哟哟一区二区三区| 制服.丝袜.亚洲.另类.中文| 亚洲欧洲精品一区二区三区不卡| 美女免费视频一区二区| 国产麻豆视频精品| 国内精品不卡在线| 91成人国产精品| 久久久久久久久久久久久久久99 | 欧美日韩在线播放三区四区| 欧美日韩国产系列| 欧美国产成人精品| 美女在线一区二区| 欧美视频在线不卡| 成人欧美一区二区三区视频网页| 麻豆国产91在线播放| 欧美图区在线视频| 国产精品人人做人人爽人人添| 日本成人在线一区| 国产精品久久久久三级| 日韩av中文字幕一区二区| 国产99久久久久| 欧美成人女星排行榜| 亚洲综合视频在线观看| 99国产欧美另类久久久精品| 国产拍揄自揄精品视频麻豆| 奇米影视7777精品一区二区| 欧美日本在线视频| 一区二区高清在线| 成人精品视频网站| 欧美极品aⅴ影院| 免费视频最近日韩| 日韩一级二级三级精品视频| 日韩激情在线观看| 色婷婷综合久久久中文一区二区| 中文无字幕一区二区三区| 国产mv日韩mv欧美| 国产午夜精品久久久久久久| 国产精品亚洲成人| 久久日韩精品一区二区五区| 精品一区二区日韩| 精品国产一二三区| 波波电影院一区二区三区| 一区二区久久久| 欧美一区二区黄| 成人永久免费视频| 一二三区精品视频| 欧美一区二区私人影院日本| 国内精品久久久久影院色| 国产精品嫩草99a| 欧美视频在线一区| 久久国内精品视频| 国产精品的网站| 欧美精品 国产精品| 国产美女视频91| 一区二区欧美视频| 欧美成人一区二区| 99re热这里只有精品免费视频| 亚洲妇女屁股眼交7| www国产精品av| 97超碰欧美中文字幕| 日本美女视频一区二区| 日本一区二区不卡视频| 欧美日韩一区不卡| 久久99精品国产| 一区二区在线电影| 日韩精品一区二区三区视频| 99精品视频一区二区三区| 五月天激情综合网| 欧美极品少妇xxxxⅹ高跟鞋| 欧美精品一二三| 成a人片国产精品| 日韩av二区在线播放| 中文字幕中文字幕一区二区| 69堂精品视频| av一本久道久久综合久久鬼色| 日韩国产欧美三级| 亚洲三级在线免费| 久久中文字幕电影| 欧美视频在线不卡| 成人av综合一区| 久久精品国产亚洲a| 依依成人综合视频| 欧美经典一区二区三区| 91精品国产aⅴ一区二区| 99久久国产综合精品女不卡| 激情文学综合网| 亚州成人在线电影| 亚洲三级免费电影| 久久精品网站免费观看| 91精品国产欧美一区二区| 91丨国产丨九色丨pron| 国产一区二区三区香蕉| 亚洲mv在线观看| 亚洲视频狠狠干| 欧美激情一二三区| 日韩精品一区在线观看| 中文字幕第一页久久| 欧美一区二区三区在线视频| 日本韩国欧美在线| av电影在线观看一区| 国产麻豆精品久久一二三| 日本vs亚洲vs韩国一区三区二区 | 色美美综合视频| 国产91在线观看丝袜| 麻豆一区二区三区| 婷婷开心激情综合| 亚洲一区二区在线免费看| 中文字幕一区日韩精品欧美| 国产三级精品在线| wwwwww.欧美系列| 日韩免费看的电影| 欧美一区二区视频免费观看| 欧美精品亚洲二区| 在线看国产一区二区| 99综合影院在线| av在线一区二区| 99久久精品一区| 99在线精品一区二区三区| 成人动漫一区二区| 成人国产电影网| a在线播放不卡| 91丝袜美腿高跟国产极品老师 | 国产精品乱码一区二区三区软件| 久久这里只精品最新地址| 精品国偷自产国产一区| 日韩欧美一二区| 日韩精品在线网站| 精品久久国产97色综合| 精品国产乱子伦一区| 久久这里只有精品6| 久久一区二区视频| 国产日韩欧美高清| 欧美经典一区二区三区| 欧美国产日韩精品免费观看| 国产欧美日产一区| 中文字幕亚洲电影| 一区二区三区加勒比av| 亚洲成人一二三| 免费观看日韩av| 国产一区在线观看麻豆| 国产成人av网站| 91亚洲永久精品| 欧美日本一道本| 日韩免费观看高清完整版| 久久久电影一区二区三区| 中文字幕第一区二区|