00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RAUL_SYMBOL_HPP
00019 #define RAUL_SYMBOL_HPP
00020
00021 #include <iostream>
00022 #include <cctype>
00023 #include <string>
00024 #include <cstring>
00025 #include <cassert>
00026
00027 namespace Raul {
00028
00029
00036 class Symbol : public std::basic_string<char> {
00037 public:
00038
00044 Symbol(const std::basic_string<char>& symbol)
00045 : std::basic_string<char>(symbol)
00046 {
00047 assert(is_valid(symbol));
00048 }
00049
00050
00056 Symbol(const char* csymbol)
00057 : std::basic_string<char>(csymbol)
00058 {
00059 assert(is_valid(csymbol));
00060 }
00061
00062 static bool is_valid(const std::basic_string<char>& path);
00063
00064 static std::string symbolify(const std::basic_string<char>& str);
00065 };
00066
00067
00068 }
00069
00070 #endif // RAUL_SYMBOL_HPP