Changeset 36 for pjproject/main/pjlib/include/pj++/scanner.hpp
- Timestamp:
- Nov 9, 2005 3:37:19 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/include/pj++/scanner.hpp
r29 r36 5 5 #define __PJPP_SCANNER_H__ 6 6 7 #include <pj /scanner.h>7 #include <pjlib-util/scanner.h> 8 8 #include <pj++/string.hpp> 9 9 10 class P J_CharSpec10 class Pj_Char_Spec 11 11 { 12 12 public: 13 P J_CharSpec() { pj_cs_init(cs__); }13 Pj_Char_Spec() { pj_cs_init(cs__); } 14 14 15 15 void set(int c) { pj_cs_set(cs__, c); } … … 37 37 }; 38 38 39 class P J_Scanner39 class Pj_Scanner 40 40 { 41 41 public: 42 P J_Scanner() {}42 Pj_Scanner() {} 43 43 44 44 enum … … 68 68 int peek_char() const 69 69 { 70 return *scanner_.cur rent;70 return *scanner_.curptr; 71 71 } 72 72 73 int peek(const P J_CharSpec *cs, PJ_String *out)73 int peek(const Pj_Char_Spec *cs, Pj_String *out) 74 74 { 75 75 return pj_scan_peek(&scanner_, cs->cs_(), out); 76 76 } 77 77 78 int peek_n(pj_size_t len, P J_String *out)78 int peek_n(pj_size_t len, Pj_String *out) 79 79 { 80 80 return pj_scan_peek_n(&scanner_, len, out); 81 81 } 82 82 83 int peek_until(const P J_CharSpec *cs, PJ_String *out)83 int peek_until(const Pj_Char_Spec *cs, Pj_String *out) 84 84 { 85 85 return pj_scan_peek_until(&scanner_, cs->cs_(), out); 86 86 } 87 87 88 void get(const P J_CharSpec *cs, PJ_String *out)88 void get(const Pj_Char_Spec *cs, Pj_String *out) 89 89 { 90 90 pj_scan_get(&scanner_, cs->cs_(), out); 91 91 } 92 92 93 void get_n(unsigned N, P J_String *out)93 void get_n(unsigned N, Pj_String *out) 94 94 { 95 95 pj_scan_get_n(&scanner_, N, out); … … 101 101 } 102 102 103 void get_quote(int begin_quote, int end_quote, P J_String *out)103 void get_quote(int begin_quote, int end_quote, Pj_String *out) 104 104 { 105 105 pj_scan_get_quote(&scanner_, begin_quote, end_quote, out); … … 111 111 } 112 112 113 void get_until(const P J_CharSpec *cs, PJ_String *out)113 void get_until(const Pj_Char_Spec *cs, Pj_String *out) 114 114 { 115 115 pj_scan_get_until(&scanner_, cs->cs_(), out); 116 116 } 117 117 118 void get_until_ch(int until_ch, P J_String *out)118 void get_until_ch(int until_ch, Pj_String *out) 119 119 { 120 120 pj_scan_get_until_ch(&scanner_, until_ch, out); 121 121 } 122 122 123 void get_until_chr(const char *spec, P J_String *out)123 void get_until_chr(const char *spec, Pj_String *out) 124 124 { 125 125 pj_scan_get_until_chr(&scanner_, spec, out);
Note: See TracChangeset
for help on using the changeset viewer.