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

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

?? parse.c

?? uva trilearn的robocup源程序
?? C
字號:
/*Copyright (c) 2000-2002, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University of Amsterdam nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*! \file Parse.C<pre><b>File:</b>          Parse.C<b>Project:</b>       Robocup Soccer Simulation Team: UvA Trilearn<b>Authors:</b>       Jelle Kok<b>Created:</b>       12/02/2001<b>Last Revision:</b> $ID$<b>Contents:</b>      class declarations of Parse class that can be used to               quickly parse specific string messages.<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>12/02/2001       Jelle Kok       Initial version created</pre>*/#include "Parse.h"#include <ctype.h>    // needed for isdigit#include <math.h>     // needed for pow#include <string.h>   // needed for strlen/******************************************************************************//*********************** CLASS PARSE ******************************************//******************************************************************************//*! This method walks through the string starting at the character where strMsg    points to and stops when or the end of the string is reached or a non space    is reached. strMsg is updated to this new position.    \param strMsg pointer to a character in a string array    \return character that is at the first non space, '\0' when end of string    is reached. */char Parse::gotoFirstNonSpace( char** strMsg ){  while(*strMsg && isspace(**strMsg) )    (*strMsg)++;  return  (*strMsg) ?  **strMsg : '\0';}/*! This method walks through the string starting at the character where strMsg    points to and stops when<BR>    - the end of the string is reached<BR>    - a character different than ' ' and ')' is read<BR>    strMsg is changed after this method is called.    \param strMsg pointer to a character in a string array    \return first character that is not equal to ' ' or ')', '\0' when string            didn't contain such a character. */char Parse::gotoFirstSpaceOrClosingBracket( char** strMsg ){  while( *strMsg && **strMsg!=' ' && **strMsg!=')' )    (*strMsg)++;  return  (*strMsg) ?  **strMsg : '\0';}/*! This method walks through the string starting at the character where strMsg    points to and stops when the character c is reached. strMsg is changed    after this method is called..    \param c character that is searched for in strMsg.    \param strMsg pointer to a character in a string array    \return number of character skipped to reach c, -1 when not found */int Parse::gotoFirstOccurenceOf( char c, char** strMsg ){  int i=0;  while(**strMsg && **strMsg != c )  {    i++;    (*strMsg)++;  }  if( ! **strMsg )    return -1;  return i;}/*! This method walks through the string starting at the character where strMsg    points to and returns the first integer that can be read from this string.    Any other characters in front of this integer are discarded. After this    method is returned, strMsg points to the first character after the final    value of the integer.    \param strMsg pointer to a character in a string array    \return first integer that can be read from this string. */int Parse::parseFirstInt( char** strMsg ){  int  iRes  = 0;  bool bIsMin= false;  char *str  = *strMsg;  while( *str != '\0' && !isdigit(*str) && *str!='-')    str++;                             // walk to first non digit or minus sign  if( *str != '\0' && *str=='-')       // if it was a minus sign, remember  {    bIsMin=true;    str++;  }  while( *str != '\0' && *str<='9' && *str>='0' )   // for all digits  {      iRes=iRes*10+(int)(*str-'0');                 // multiply old res with 10      str++;                                        // and add new value  }  *strMsg = str;  return (bIsMin) ? -iRes : iRes;}/*! This method walks through the string starting at the character where strMsg    points to and returns the first double that can be read from this string.    Any other characters in front of this integer are discarded. After this    method is returned, strMsg points to the first character after the final    value of the double. 4e-3, and NaN or nan are also recognized. When input    contains NaN or nan, -1000.0 is returned.    \param strMsg pointer to a character in a string array    \return first double that can be read from this string. */double Parse::parseFirstDouble( char** strMsg ){  double dRes=0.0, dFrac=1.0;  bool bIsMin=false, bInDecimal=false, bCont=true;  char *str = *strMsg;  // go to first part of double (digit, minus sign or '.')  while( *str != '\0' && !isdigit(*str) && *str!='-' && *str!='.')  {    // when NaN or nan is double value, return -1000.0    if( (*str=='N' && strlen(str)>3 && *(str+1)=='a' && *(str+2)=='N') ||        (*str=='n' && strlen(str)>3 && *(str+1)=='a' && *(str+2)=='n') )    {      *strMsg = str+3;      return -1000.0;    }    else       str++;  }  if( *str != '\0' && *str=='-')               // if minus sign, remember that  {    bIsMin=true;    str++;  }  while( *str != '\0' && bCont)                // process the number bit by bit  {    if( *str=='.' )                            // in decimal part after '.'      bInDecimal = true;    else if( bInDecimal && *str<='9' && *str>='0') // number and in decimal    {      dFrac=dFrac*10.0;                        // shift decimal part to right      dRes += (double)(*str-'0')/dFrac;        // and add number    }    else if( *str<='9' && *str>='0' )          // if number and not decimal      dRes=dRes*10+(double)(*str-'0');         // shift left and add number    else if( *str=='e' ) // 10.6e-08           // if to power e    {      if( *(str+1) == '+' )                    // determine sign        dRes *=  pow(10, parseFirstInt(&str)); // and multiply with power      else if( *(str+1) == '-' )      {        str = str+2;                           // skip -        dRes /=  pow(10, parseFirstInt(&str)); // and divide by power      }      bCont = false;                           // after 'e' stop    }    else      bCont = false;                           // all other cases stop    if( bCont == true )                        // update when not stopped yet      str++;  }  *strMsg = str;  return (bIsMin && dRes != 0.0) ? -dRes : dRes;}/******************************************************************************//********************** TESTING PURPOSES *************************************//******************************************************************************//*#include<iostream.h>int main( void ){  double d = 13.6e+15;  char str[] = "13.6e+15";  double d2 = 13.6e-15;  char str2[] = "13.6e-15";  char *strmsg;  strmsg = &str[0];  cout  << d << endl;  cout << Parse::parseFirstDouble( &strmsg )<< endl;  strmsg = &str2[0];  cout  << d2 << endl;  cout << Parse::parseFirstDouble( &strmsg ) << endl;  return 0;}*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人高清在线视频| 奇米影视7777精品一区二区| 日韩免费在线观看| 91精品国产综合久久精品图片| 91福利在线看| 欧美日韩精品福利| 欧美高清视频www夜色资源网| 欧美偷拍一区二区| 欧美高清视频在线高清观看mv色露露十八 | 亚洲男人电影天堂| 亚洲少妇中出一区| 午夜欧美2019年伦理| 亚洲3atv精品一区二区三区| 五月婷婷综合网| 美女精品一区二区| 国产成人精品亚洲777人妖 | 在线视频观看一区| 91传媒视频在线播放| 欧美日韩中文另类| 日韩欧美不卡一区| 中文字幕制服丝袜成人av| 亚洲欧美另类图片小说| 日韩专区在线视频| 韩国精品在线观看| 一本色道亚洲精品aⅴ| 欧美人与禽zozo性伦| 日韩美女在线视频| 国产精品久久久久影院| 视频一区二区中文字幕| 国产乱色国产精品免费视频| 99免费精品在线| 91精品婷婷国产综合久久| 久久精品在线免费观看| 亚洲综合久久av| 黄色资源网久久资源365| a4yy欧美一区二区三区| 欧美丝袜自拍制服另类| 国产日本欧洲亚洲| 亚洲成人av电影| 丁香亚洲综合激情啪啪综合| 色婷婷精品久久二区二区蜜臀av| 欧美一级黄色录像| 国产精品福利在线播放| 免费成人av在线播放| 色综合久久综合中文综合网| 精品日韩av一区二区| 亚洲精品乱码久久久久久久久 | 不卡一区二区三区四区| 制服丝袜激情欧洲亚洲| 亚洲视频 欧洲视频| 韩国v欧美v亚洲v日本v| 欧美网站一区二区| 1000部国产精品成人观看| 美女网站视频久久| 欧美日韩一区二区三区免费看| 欧美国产日韩亚洲一区| 麻豆国产欧美一区二区三区| 在线亚洲精品福利网址导航| 国产日韩成人精品| 狠狠色丁香久久婷婷综| 欧美一级免费观看| 午夜精品成人在线视频| 一本色道久久综合亚洲91| 国产农村妇女精品| 国产一区二区三区四区五区入口| 5566中文字幕一区二区电影| 亚洲自拍都市欧美小说| 99精品视频在线观看免费| 欧美韩日一区二区三区四区| 国模大尺度一区二区三区| 日韩欧美不卡一区| 久久成人免费网| 日韩欧美一区二区久久婷婷| 免费在线观看视频一区| 6080日韩午夜伦伦午夜伦| 亚洲风情在线资源站| 欧美视频完全免费看| 午夜av一区二区三区| 91精品午夜视频| 九色|91porny| 亚洲精品一区二区三区蜜桃下载 | 国产成人精品三级麻豆| 久久综合九色综合97婷婷女人| 狠狠色综合色综合网络| 久久精品欧美一区二区三区不卡 | 伊人性伊人情综合网| 色婷婷av久久久久久久| 亚洲成av人**亚洲成av**| 欧美一级黄色片| 国产精品一区二区在线观看不卡 | 69久久99精品久久久久婷婷| 人人狠狠综合久久亚洲| 精品国产露脸精彩对白| 懂色av一区二区三区免费观看| 亚洲欧洲日韩在线| 欧美亚洲免费在线一区| 毛片不卡一区二区| 久久久午夜精品理论片中文字幕| 国产91精品在线观看| 亚洲精品伦理在线| 日韩精品一区二区三区老鸭窝| 国产精品夜夜嗨| 一区二区三区日韩精品| 欧美一区在线视频| 成人激情免费电影网址| 日韩一区精品字幕| 国产欧美视频一区二区| 欧美日韩视频第一区| 国内精品久久久久影院薰衣草| 中文字幕中文在线不卡住| 91精品婷婷国产综合久久 | 亚洲天堂中文字幕| 欧美高清你懂得| 99亚偷拍自图区亚洲| 人人精品人人爱| 一区二区三区在线视频免费 | 国产v综合v亚洲欧| 亚洲成人av一区| 国产精品素人一区二区| 欧美日本在线视频| www.日韩大片| 另类成人小视频在线| 亚洲欧美日韩综合aⅴ视频| 2021中文字幕一区亚洲| 欧美色区777第一页| 成人毛片视频在线观看| 麻豆精品视频在线观看| 亚洲五月六月丁香激情| 国产精品青草综合久久久久99| 欧美福利视频一区| 91在线观看美女| 国产精品一区二区视频| 人人精品人人爱| 午夜久久久久久| 一区二区三区自拍| 自拍偷自拍亚洲精品播放| 久久久久一区二区三区四区| 欧美福利一区二区| 精品视频免费在线| 91麻豆123| 91网站最新网址| 成人开心网精品视频| 国产乱码精品1区2区3区| 毛片一区二区三区| 久久国产日韩欧美精品| 日本免费新一区视频| 婷婷亚洲久悠悠色悠在线播放| 亚洲色图欧美在线| 亚洲人吸女人奶水| 亚洲精品美腿丝袜| 亚洲最大成人综合| 亚洲午夜电影在线观看| 亚洲chinese男男1069| 亚洲电影一区二区三区| 亚洲国产一二三| 午夜伦欧美伦电影理论片| 亚洲成人动漫av| 狠狠久久亚洲欧美| 韩国视频一区二区| 国产精一区二区三区| 国产一区二区女| fc2成人免费人成在线观看播放| 国产福利91精品| 丁香激情综合国产| 色先锋aa成人| 在线不卡免费av| 久久综合久久综合久久综合| 国产亚洲精品bt天堂精选| 国产目拍亚洲精品99久久精品| 欧美国产日韩a欧美在线观看| 亚洲欧美综合在线精品| 一区二区三区免费看视频| 亚洲高清视频的网址| 久久99久久精品| 成人听书哪个软件好| 欧美熟乱第一页| 精品久久久久久久人人人人传媒 | 国产精品无遮挡| 一区二区三区四区av| 老司机精品视频一区二区三区| 久久国产福利国产秒拍| av一区二区三区四区| 欧美日韩美女一区二区| 久久影院电视剧免费观看| 国产精品福利av| 亚洲va韩国va欧美va精品| 韩国女主播一区二区三区| eeuss鲁片一区二区三区| 91精品国产综合久久久蜜臀粉嫩| 国产日产欧美精品一区二区三区| 亚洲精品一卡二卡| 精品一区精品二区高清| 色综合久久99| 精品国产乱码久久久久久1区2区 | 成人永久aaa| 欧美性受xxxx黑人xyx性爽| 久久久99精品免费观看| 亚洲成a人片综合在线| 国产精品中文字幕一区二区三区| 在线观看不卡视频|