Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9314 in orxonox.OLD for branches/proxy/src/lib


Ignore:
Timestamp:
Jul 18, 2006, 1:48:19 AM (18 years ago)
Author:
bensch
Message:

orxonox/proxy:
removed the tokenizer (partly) from all orxonox code and reset it with SubString

@patrick: ok like this, hope it works :)

Location:
branches/proxy/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/graphics/importer/md3/md3_animation_cfg.cc

    r8724 r9314  
    1919#include "md3_animation.h"
    2020
    21 #include "tokenizer.h"
     21#include "substring.h"
    2222#include "helper_functions.h"
    2323
    2424#include "debug.h"
    2525
    26 #include <stdio.h>
    27 #include <stdlib.h>
    2826
    2927
     
    9896        if( inHeader && line.find("sex") == 0) {
    9997          //parse line: sex [m | f | ...]
    100           std::vector<std::string> tokens;
    101           Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
     98          SubString tokens(line, " \t\n\r\f/");
    10299
    103100          std::string sexStr = tokens.back();
     
    115112        else if( inHeader && line.find("headoffset") == 0) {
    116113          // parse line: headoffset X Y Z
    117           std::vector<std::string> tokens;
    118           Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
     114          SubString tokens(line, " \t\n\r\f/");
    119115
    120116          float z = atof(tokens.back().c_str()); tokens.pop_back();
     
    128124        else if( inHeader && line.find("footsteps") == 0) {
    129125          //parse line: footsteps [normal | mech | ...]
    130           std::vector<std::string> tokens;
    131           Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
     126          SubString tokens (line, " \t\n\r\f/");
    132127
    133128          this->footsteps = tokens.back();
     
    187182    // parse the line:
    188183    // first frame, num frames, looping frames, frames per second (fps)
    189     std::vector<std::string> tokens;
    190     Tokenizer::tokenize(line, tokens, " \t\n\r\f/");
     184    SubString tokens(line, " \t\n\r\f/");
    191185
    192186    anim->fps = atoi(tokens.back().c_str()); tokens.pop_back();
  • branches/proxy/src/lib/util/substring.h

    r9313 r9314  
    9191  /** @returns the back of the StringList. */
    9292  inline const std::string& back() const { return this->strings.back(); };
     93  /** @brief removes the back of the strings list. */
     94  inline void pop_back() { this->strings.pop_back(); };
    9395
    9496  // the almighty algorithm.
Note: See TracChangeset for help on using the changeset viewer.