Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 1:10:46 AM (16 years ago)
Author:
rgrieder
Message:

SVN doesn't seem to like me. Reverted some really badly converted line endings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/util/ExprParser.h

    r1494 r1495  
    11/*
    22 *   ORXONOX - the hottest 3D action shooter ever to exist
    3  *                    > www.orxonox.net < *
     3 *                    > www.orxonox.net <
     4 *
    45 *
    56 *   License notice:
     
    3031  @brief Declaration of FloatParser
    3132*/
    32 #ifndef _FloatParser_H__#define _FloatParser_H__#include "UtilPrereqs.h"#include <string>class _UtilExport ExprParser{public:  enum binary_operator  {    b_plus,    b_minus,    mal,    durch,    modulo,    hoch,    undef,    oder,    und,    gleich,    b_nicht,    kleiner,    groesser,    ungleich,    kleinergleich,    groessergleich  };  enum unary_operator  {    u_plus,    u_minus,    u_nicht  };  ExprParser(const std::string& str);  std::string& getRemains() { return  this->remains_; }  double       getResult()  { return  this->result_; }  bool         getSuccess() { return !this->failed_; }private:  double parse_expr_1();  double parse_expr_2();  double parse_expr_3();  double parse_expr_4();  double parse_expr_5();  double parse_expr_6();  double parse_expr_7();  double parse_expr_8();  char* parse_word(char* str);  binary_operator parse_binary_operator();  unary_operator parse_unary_operator();  double parse_argument();  double parse_last_argument();  binary_operator op;  const char* reading_stream;  bool failed_;  double result_;  std::string remains_;};//Endzeichen für float expression: ')', '}', ']', ',', ';'_UtilExport bool parse_float(char* const, char**, double*);//Endzeichen angegeben_UtilExport bool parse_float(char* const, char**, char, double*);//Letzter Teil-float eines Vektors parsen (keine Vergleichs- und Logikoperationen)_UtilExport bool parse_vector_float(char* const, char**, bool, double*);#endif /* _FloatParser_H__ */
     33
     34#ifndef _FloatParser_H__
     35#define _FloatParser_H__
     36
     37#include "UtilPrereqs.h"
     38#include <string>
     39
     40class _UtilExport ExprParser
     41{
     42public:
     43  enum binary_operator
     44  {
     45    b_plus,
     46    b_minus,
     47    mal,
     48    durch,
     49    modulo,
     50    hoch,
     51    undef,
     52    oder,
     53    und,
     54    gleich,
     55    b_nicht,
     56    kleiner,
     57    groesser,
     58    ungleich,
     59    kleinergleich,
     60    groessergleich
     61  };
     62
     63  enum unary_operator
     64  {
     65    u_plus,
     66    u_minus,
     67    u_nicht
     68  };
     69
     70
     71  ExprParser(const std::string& str);
     72  std::string& getRemains() { return  this->remains_; }
     73  double       getResult()  { return  this->result_; }
     74  bool         getSuccess() { return !this->failed_; }
     75
     76private:
     77  double parse_expr_1();
     78  double parse_expr_2();
     79  double parse_expr_3();
     80  double parse_expr_4();
     81  double parse_expr_5();
     82  double parse_expr_6();
     83  double parse_expr_7();
     84  double parse_expr_8();
     85  char* parse_word(char* str);
     86  binary_operator parse_binary_operator();
     87  unary_operator parse_unary_operator();
     88
     89  double parse_argument();
     90  double parse_last_argument();
     91
     92  binary_operator op;
     93  const char* reading_stream;
     94  bool failed_;
     95  double result_;
     96  std::string remains_;
     97
     98};
     99
     100//Endzeichen für float expression: ')', '}', ']', ',', ';'
     101_UtilExport bool parse_float(char* const, char**, double*);
     102//Endzeichen angegeben
     103_UtilExport bool parse_float(char* const, char**, char, double*);
     104//Letzter Teil-float eines Vektors parsen (keine Vergleichs- und Logikoperationen)
     105_UtilExport bool parse_vector_float(char* const, char**, bool, double*);
     106
     107#endif /* _FloatParser_H__ */
Note: See TracChangeset for help on using the changeset viewer.