Last change
on this file since 1252 was
193,
checked in by Maciej Komosinski, 11 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1] | 1 | /* |
---|
| 2 | * conv_f8_utils.h |
---|
| 3 | * L-systemToF1 |
---|
| 4 | * |
---|
| 5 | * Created by Maciej Wajcht on 08-09-21. |
---|
| 6 | * Copyright 2008 __MyCompanyName__. All rights reserved. |
---|
| 7 | * |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #ifndef _CONV_F8_UTILS_H_ |
---|
| 11 | #define _CONV_F8_UTILS_H_ |
---|
| 12 | |
---|
| 13 | #include <iostream> |
---|
| 14 | #include <sstream> |
---|
| 15 | #include <string> |
---|
| 16 | #include <stdexcept> |
---|
| 17 | #include <stack> |
---|
| 18 | #include <vector> |
---|
| 19 | #include "sstring.h" |
---|
| 20 | |
---|
| 21 | using namespace std; |
---|
| 22 | |
---|
| 23 | class BadConversion : public std::runtime_error { |
---|
| 24 | public: |
---|
| 25 | BadConversion(const std::string &s) : std::runtime_error(s) { } |
---|
| 26 | }; |
---|
| 27 | |
---|
| 28 | class ParseExpressionException : public std::runtime_error { |
---|
| 29 | public: |
---|
| 30 | ParseExpressionException(const std::string &s) : std::runtime_error(s) { } |
---|
| 31 | }; |
---|
| 32 | |
---|
| 33 | bool containsChars(const SString s, char c[]); |
---|
| 34 | bool containsChar(std::vector<char> tab, char c); |
---|
| 35 | int reverseFindInSString(const SString s, char c, int index = -1); |
---|
| 36 | SString trimSString(const SString s); |
---|
| 37 | SString trimSString(const SString s); |
---|
| 38 | double parseDouble(const SString &s); |
---|
| 39 | int parseInt(const SString &s); |
---|
| 40 | SString stringToSString(string str); |
---|
| 41 | string sstringToString(SString sstr); |
---|
| 42 | SString convertReversePolishNotationToNatural(const SString &s); |
---|
| 43 | double parseExpression(const SString &s); |
---|
| 44 | |
---|
| 45 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.