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

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

?? gameswf_xml.cpp

?? 一個開源的嵌入式flash播放器 具體看文檔和例子就可
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
    } else {      parent[depth] = node;      parent[depth+1] = node;    }    //  xmlTextReaderAttributeCount(reader);    if (xmlTextReaderHasAttributes(reader)) {      // log_msg("Has Attributes!\n");      xmlTextReaderMoveToFirstAttribute(reader);      processNode(reader, element);      while(xmlTextReaderMoveToNextAttribute(reader)) {        processNode(reader, element);      }    }    break;  case XML_READER_TYPE_TEXT:    element = node;//      log_msg("%sValue at depth %d is \"%s\" for node at %p\n", tabs[depth], depth, value, element);    element->_value = (char *)new char[strlen(reinterpret_cast<const char *>(value))+1];    memset(element->_value, 0, strlen(reinterpret_cast<const char *>(value))+1);    strcpy(element->_value, reinterpret_cast<const char *>(value));    break;  case XML_READER_TYPE_ATTRIBUTE:    element = node;    XMLAttr *attrib = new XMLAttr;    attrib->_name = (char *)new char[strlen(reinterpret_cast<const char *>(name))+1];    memset(attrib->_name, 0, strlen(reinterpret_cast<const char *>(name))+1);    strcpy(attrib->_name, reinterpret_cast<const char *>(name));    attrib->_value = (char *)new char[strlen(reinterpret_cast<const char *>(value))+1];    memset(attrib->_value, 0, strlen(reinterpret_cast<const char *>(value))+1);    strcpy(attrib->_value, reinterpret_cast<const char *>(value));//     log_msg("%sPushing attribute %s, value \"%s\" for node %s\n", tabs[depth], name, value, element->_name);    element->_attributes.push_back(attrib);    break;  default:   // FIXME: why does this break GCC 3.3.3 but not 3.4.3 ?    log_error("Unsupported XML type %d\n!", type);    break;  };  xmlFree(name);  if (value != NULL) {    xmlFree(value);  }  //previous_depth = depth;  return element;}#endif// This reads in an XML file from disk and parses into into a memory resident// tree which can be walked through later.boolXML::load(const char *filespec){  bool ret = true;  log_msg("Load disk XML file: %s\n", filespec);    //log_msg("%s: mem is %d\n", __FUNCTION__, mem);#ifdef USE_XMLREADER  XMLNode *node = 0;  xmlTextReaderPtr reader;      reader = xmlNewTextReaderFilename(filespec);  if (reader != NULL) {    ret = true;    while (ret) {      ret = xmlTextReaderRead(reader);      node = processNode(reader, node);    }    xmlFreeTextReader(reader);    if (ret != false) {      log_error("%s : couldn't parse\n", filespec);      return false;    }  } else {    log_error("Unable to open %s\n", filespec);      return false;  }  xmlCleanupParser();  return true;#else#ifdef USE_DOM  xmlInitParser();  _doc = xmlParseFile(filespec);  if (_doc == 0) {    log_error("Can't load XML file: %s!\n", filespec);    return false;  }  ret = parseDoc(_doc, false);  xmlCleanupParser();  xmlFreeDoc(_doc);  xmlMemoryDump();  return true;#else#error "You have to enable either a DOM or an xmlReader XML parser"#endif#endif}boolXML::onLoad(){  log_msg("%s: FIXME: onLoad Default event handler\n", __FUNCTION__);  return(_loaded);}XMLNode *XML::operator [] (int x) {  log_msg("%s:\n", __FUNCTION__);  return _nodes->_children[x];}voidXML::cleanupStackFrames(XMLNode *xml){}as_object *XML::setupFrame(as_object *obj, XMLNode *xml, bool mem){  int           child, i;  const char    *nodename;  //const char    *nodevalue;  //AS_value      nodevalue;  int           length;  as_value      inum;  XMLNode       *childnode;  xmlnode_as_object *xmlchildnode_obj;  xmlattr_as_object* attr_obj;  //log_msg("\t%s: processing node %s for object %p, mem is %d\n", __FUNCTION__, xml->_name, obj, mem);    // Get the data for this node  nodename   = xml->_name;  //nodename   = xml->_name.c_str();  //nodevalue  = xml->_value;  length     = xml->length();  // Set these members in the top level object passed in. This are used  // primarily by the disk based XML parser, where at least in all my current  // test cases this is referenced with firstChild first, then nodeName and  // childNodes.  obj->set_member("nodeName",           nodename);  obj->set_member("length",             length);  if (xml->_value != 0) {    obj->set_member("nodeValue",        xml->_value);    //log_msg("\tnodevalue for %s is: %s\n", nodename, xml->_value);  } else {    obj->set_member("nodeValue", as_value::UNDEFINED);  }//   if (nodevalue.get_type() != as_value::UNDEFINED) {//     obj->set_member("nodeValue",        nodevalue.to_string());//     log_msg("\tnodevalue for %s is: %s\n", nodename, nodevalue.to_string());//   } else {//     // If there is no value, we want to define it as an empty//     // string.//     obj->set_member("nodeValue", "");//   }    // Process the attributes, if any  if (xml->_attributes.size() == 0) {    //log_msg("\t\tNo attributes for node %s, created empty object at %p\n", nodename, attr_obj);//     log_msg("\t\tNo attributes for node %s\n", nodename);  } else {    attr_obj = new xmlattr_as_object;    for (i=0; i<xml->_attributes.size(); i++) {      attr_obj->set_member(xml->_attributes[i]->_name, xml->_attributes[i]->_value);//        log_msg("\t\tAdding attribute as member %s, value is %s to node %s (%p)\n",//                xml->_attributes[i]->_name,//                xml->_attributes[i]->_value, nodename, obj);    }    obj->set_member("attributes", attr_obj);  }  //xml->_attributes.resize(0);  //obj->set_member("attributes", attr_obj);  // Process the children, if there are any  if (length) {    //log_msg("\tProcessing %d children nodes for %s\n", length, nodename);    inum = 0;    for (child=0; child<length; child++) {      // Create a new AS object for this node's children      xmlchildnode_obj = new xmlnode_as_object;      // When parsing XML from memory, the test movies I have expect the firstChild      // to be the first element of the array instead.      if (mem) {        childnode = xml;        //obj->set_member(inum.to_string(), obj);        //inum += 1;        //childnode = xml->_children[child];      } else {        childnode = xml->_children[child];      }      setupFrame(xmlchildnode_obj, childnode, false); // setup child node      obj->set_member(inum.to_string(), xmlchildnode_obj);      inum += 1;    }  } else {    //log_msg("\tNode %s has no children\n", nodename);  }    return obj;}  //// Callbacks. These are the wrappers for the C++ functions so they'll work as// callbacks from within gameswf.//voidxml_load(const fn_call& fn){  as_value	method;  as_value	val;  bool          ret;  struct stat   stats;  //log_msg("%s:\n", __FUNCTION__);    xml_as_object *xml_obj = (xml_as_object*)fn.this_ptr;    assert(ptr);  const tu_string filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string();  // If the file doesn't exist, don't try to do anything.  if (stat(filespec.c_str(), &stats) < 0) {    fprintf(stderr, "ERROR: doesn't exist.%s\n", filespec.c_str());    fn.result->set(false);    return;  }    // Set the argument to the function event handler based on whether the load  // was successful or failed.  ret = xml_obj->obj.load(filespec);  fn.result->set(ret);  if (ret == false) {    return;  }      //env->bottom(first_arg) = ret;  array<with_stack_entry> with_stack;  array<with_stack_entry> dummy_stack;  //  struct node *first_node = ptr->obj.firstChildGet();    //const char *name = ptr->obj.nodeNameGet();  if (xml_obj->obj.hasChildNodes() == false) {    log_error("%s: No child nodes!\n", __FUNCTION__);  }    xml_obj->obj.setupFrame(xml_obj, xml_obj->obj.firstChild(), false);  #if 1  if (fn.this_ptr->get_member("onLoad", &method)) {    //    log_msg("FIXME: Found onLoad!\n");    fn.env->set_variable("success", true, 0);    fn.env->bottom(fn.first_arg_bottom_index) = true;    as_c_function_ptr	func = method.to_c_function();    if (func)      {        // It's a C function.  Call it.        log_msg("Calling C function for onLoad\n");        (*func)(fn_call(&val, xml_obj, fn.env, fn.nargs, fn.first_arg_bottom_index)); // was this_ptr instead of node      }    else if (as_as_function* as_func = method.to_as_function())      {        // It's an ActionScript function.  Call it.        log_msg("Calling ActionScript function for onLoad\n");        (*as_func)(fn_call(&val, xml_obj, fn.env, fn.nargs, fn.first_arg_bottom_index)); // was this_ptr instead of node      } else {        log_error("error in call_method(): method is not a function\n");      }  } else {    log_msg("Couldn't find onLoad event handler, setting up callback\n");    // ptr->set_event_handler(event_id::XML_LOAD, (as_c_function_ptr)&xml_onload);  }#else  xml_obj->set_event_handler(event_id::XML_LOAD, &xml_onload);#endif  fn.result->set(true);}// This executes the event handler for XML::XML_LOAD if it's been defined,// and the XML file has loaded sucessfully.voidxml_onload(const fn_call& fn){  //log_msg("%s:\n", __FUNCTION__);      as_value	method;  as_value      val;  static bool first = true;     // This event handler should only be executed once.  array<with_stack_entry>	empty_with_stack;  xml_as_object*	ptr = (xml_as_object*) (as_object*) fn.this_ptr;  assert(ptr);    if ((ptr->obj.loaded()) && (first)) {    // env->set_variable("success", true, 0);    //as_value bo(true);    //env->push_val(bo);    first = false;    log_msg("The XML file has been loaded successfully!\n");    // ptr->on_event(event_id::XML_LOAD);    //env->set_variable("success", true, 0);    //env->bottom(0) = true;        if (fn.this_ptr->get_member("onLoad", &method)) {      // log_msg("FIXME: Found onLoad!\n");      as_c_function_ptr	func = method.to_c_function();      if (func)        {          // It's a C function.  Call it.          log_msg("Calling C function for onLoad\n");          (*func)(fn_call(&val, fn.this_ptr, fn.env, 0, 0));        }      else if (as_as_function* as_func = method.to_as_function())        {          // It's an ActionScript function.  Call it.          log_msg("Calling ActionScript function for onLoad\n");        (*as_func)(fn_call(&val, fn.this_ptr, fn.env, 0, 0));        }      else        {          log_error("error in call_method(): method is not a function\n");        }        } else {      log_msg("FIXME: Couldn't find onLoad!\n");    }  }        fn.result->set(&val);}// This is the default event handler, and is usually redefined in the SWF scriptvoidxml_ondata(const fn_call& fn){  log_msg("%s:\n", __FUNCTION__);      as_value	method;  as_value	val;  static bool first = true;     // FIXME: ugly hack!    xml_as_object*	ptr = (xml_as_object*)fn.this_ptr;  assert(ptr);    if ((ptr->obj.loaded()) && (first)) {    if (fn.this_ptr->get_member("onData", &method)) {      log_msg("FIXME: Found onData!\n");      as_c_function_ptr	func = method.to_c_function();      fn.env->set_variable("success", true, 0);      if (func)        {          // It's a C function.  Call it.          log_msg("Calling C function for onData\n");          (*func)(fn_call(&val, fn.this_ptr, fn.env, 0, 0));      }      else if (as_as_function* as_func = method.to_as_function())        {          // It's an ActionScript function.  Call it.          log_msg("Calling ActionScript function for onData\n");          (*as_func)(fn_call(&val, fn.this_ptr, fn.env, 0, 0));        }      else        {          log_error("error in call_method(): method is not a function\n");        }        } else {      log_msg("FIXME: Couldn't find onData!\n");    }  }  fn.result->set(&val);}voidxml_new(const fn_call& fn){  as_value      inum;  xml_as_object *xml_obj;  //const char    *data;    //log_msg("%s: nargs=%d\n", __FUNCTION__, nargs);    if (fn.nargs > 0) {    if (fn.env->top(0).get_type() == as_value::STRING) {      xml_obj = new xml_as_object;      //log_msg("\tCreated New XML object at %p\n", xml_obj);      tu_string datain = fn.env->top(0).to_tu_string();      xml_obj->obj.parseXML(datain);      //log_msg("*** Start setting up the stack frames ***\n");      xml_obj->obj.setupFrame(xml_obj, xml_obj->obj.firstChild(), true);      //xml_obj->obj.clear();      //delete xml_obj->obj.firstChild();    } else {      xml_as_object*	xml_obj = (xml_as_object*)fn.env->top(0).to_object();      //log_msg("\tCloned the XML object at %p\n", xml_obj);      //result->set(xml_obj);      fn.result->set_as_object_interface(xml_obj);      return;    }  } else {    xml_obj = new xml_as_object;    //log_msg("\tCreated New XML object at %p\n", xml_obj);    xml_obj->set_member("load", &xml_load);    xml_obj->set_member("loaded", &xml_loaded);  }  fn.result->set_as_object_interface(xml_obj);}//// SWF Property of this class. These are "accessors" into the private data// of the class.//// determines whether the document-loading process initiated by the XML.load()// call has completed. If the process completes successfully, the method// returns true; otherwise, it returns false.voidxml_loaded(const fn_call& fn){  as_value	method;  as_value	val;  log_msg("%s:\n", __FUNCTION__);      xml_as_object*	ptr = (xml_as_object*) (as_object*) fn.this_ptr;  assert(ptr);  tu_string filespec = fn.env->bottom(fn.first_arg_bottom_index).to_string();  fn.result->set(ptr->obj.loaded());}intmemadjust(int x){  return (x + (4 - x % 4));}} // end of gameswf namespace// HAVE_LIBXML#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线观看免费视频| 欧美精品一区二区三区一线天视频| 久久99精品国产麻豆婷婷洗澡| 怡红院av一区二区三区| 国产精品成人在线观看| 国产欧美日韩三区| 国产精品五月天| 欧美激情综合网| 中文字幕佐山爱一区二区免费| 欧美国产综合一区二区| 中日韩免费视频中文字幕| 国产亚洲欧美激情| 国产日韩影视精品| 亚洲蜜桃精久久久久久久| 亚洲乱码国产乱码精品精可以看| 亚洲精品视频在线看| 亚洲精品久久嫩草网站秘色| 亚洲精品v日韩精品| 亚洲电影一区二区| 三级成人在线视频| 韩国成人精品a∨在线观看| 韩国一区二区三区| 欧美精品色一区二区三区| 欧美日韩精品欧美日韩精品| 日韩一区二区中文字幕| 亚洲精品一区二区三区香蕉| 国产精品久久久一本精品| 夜色激情一区二区| 亚洲国产日韩a在线播放性色| 亚洲福中文字幕伊人影院| 蜜桃传媒麻豆第一区在线观看| 国产.精品.日韩.另类.中文.在线.播放| 成人手机在线视频| 制服.丝袜.亚洲.中文.综合| 久久夜色精品国产噜噜av| 亚洲视频你懂的| 久久精品国产网站| 日本久久电影网| 欧美大黄免费观看| 亚洲乱码国产乱码精品精的特点| 精品综合免费视频观看| 在线免费不卡视频| 久久蜜桃香蕉精品一区二区三区| 亚洲美女在线一区| 久久精品国产亚洲5555| av不卡在线观看| 亚洲午夜精品久久久久久久久| 国产一区二区三区在线观看精品| 国产91对白在线观看九色| av一区二区三区黑人| 婷婷六月综合网| 国产日韩欧美精品电影三级在线 | 日本女人一区二区三区| 91国偷自产一区二区开放时间| 99久久久无码国产精品| 极品美女销魂一区二区三区| 亚洲视频你懂的| 日日欢夜夜爽一区| 韩国视频一区二区| 欧美系列在线观看| 亚洲精品在线电影| 一区二区三区高清不卡| 国内精品伊人久久久久av一坑| 日韩精品一区第一页| 亚洲综合视频网| 精品一区二区三区免费播放| 国产成人精品免费视频网站| 欧美影院一区二区三区| 久久久久久久久久久久电影| 亚洲精品免费电影| 六月丁香婷婷久久| 欧美日韩一级二级| 综合分类小说区另类春色亚洲小说欧美 | 欧美精品一区二区在线播放| 亚洲精品成人少妇| 国产一区二区精品在线观看| 欧美日韩黄视频| 亚洲日本青草视频在线怡红院| 日本强好片久久久久久aaa| 国产成人av电影在线播放| 91精品国产高清一区二区三区蜜臀| 日韩三级视频中文字幕| 亚洲乱码国产乱码精品精小说 | 欧美亚一区二区| 国产日产欧美一区| 蜜臀av一区二区| 欧美在线免费视屏| 亚洲乱码日产精品bd| 国产精品一区二区在线播放| 日韩一区二区三区免费看 | 日本一区二区三区高清不卡| 一区二区三区在线视频免费| 久久av中文字幕片| 欧美精品视频www在线观看| 亚洲人妖av一区二区| 成人av电影免费观看| 国产精品久久久久久妇女6080| 精品在线免费视频| 日韩一二三四区| 麻豆国产精品一区二区三区| 欧美人与禽zozo性伦| 午夜激情久久久| 欧美一级在线视频| 日本不卡视频一二三区| 欧美一区二区人人喊爽| 亚洲一二三专区| 一区二区日韩av| 久久草av在线| 337p亚洲精品色噜噜狠狠| 午夜精品久久久久久久99樱桃 | 欧美精品自拍偷拍| 亚洲国产乱码最新视频| 欧美日本一区二区三区四区 | 国产亚洲精品7777| 日本精品视频一区二区三区| 亚洲黄色小视频| 91麻豆精品一区二区三区| 亚洲视频1区2区| 99精品视频在线免费观看| 中文字幕欧美国产| 国产成人免费网站| 中文字幕不卡一区| 色成人在线视频| 日日夜夜精品视频天天综合网| 欧美日韩一区精品| 麻豆国产一区二区| 国产三级一区二区| 午夜在线成人av| 国产成人精品一区二| 色综合天天视频在线观看| 亚洲日本护士毛茸茸| 欧美一区二区三区在线视频| 免费观看在线综合| 国产精品久久久久四虎| 欧美日韩综合在线免费观看| 美女高潮久久久| 国产欧美精品区一区二区三区 | 日本一区二区免费在线观看视频 | 成人av在线资源| 亚洲国产乱码最新视频| 日韩午夜小视频| 91免费视频网址| 久久久亚洲精华液精华液精华液 | 国产一区不卡在线| 亚洲男人电影天堂| www国产精品av| 成人av动漫在线| 国产成人av电影在线| 日韩精品亚洲一区二区三区免费| 久久嫩草精品久久久久| 欧美在线视频不卡| 婷婷激情综合网| 欧洲色大大久久| 国产午夜精品一区二区三区嫩草| 精品视频一区二区三区免费| 成人综合激情网| 麻豆视频观看网址久久| 亚洲资源在线观看| 国产女同性恋一区二区| 欧美妇女性影城| 欧美性猛交xxxx乱大交退制版 | 精品国产自在久精品国产| 日本丰满少妇一区二区三区| 极品美女销魂一区二区三区| 亚洲精品国产无套在线观| 久久精品一区二区| 91麻豆精品国产91| 在线观看国产日韩| 成人精品一区二区三区四区| 美女任你摸久久| 日本亚洲欧美天堂免费| 狠狠色丁香久久婷婷综| 亚洲成人免费在线| 亚洲成av人影院| 亚洲男人电影天堂| 国产日韩欧美在线一区| 91精品婷婷国产综合久久竹菊| 色香色香欲天天天影视综合网| 成人激情图片网| 国产91在线看| 成人精品鲁一区一区二区| 精品一区二区三区免费视频| 美国三级日本三级久久99 | 首页综合国产亚洲丝袜| 日韩区在线观看| 精品欧美久久久| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美一级日韩不卡播放免费| 6080国产精品一区二区| 欧美日韩成人一区| 日韩一级完整毛片| 日韩一区二区三区四区| 欧美电影在哪看比较好| 欧美一区二区在线播放| 精品国产三级电影在线观看| 欧美变态凌虐bdsm| 精品1区2区在线观看| 久久精品亚洲精品国产欧美| 日韩一区二区中文字幕| 在线中文字幕一区二区|