Changeset 30548de for libcfa/src/collections
- Timestamp:
- Apr 11, 2025, 6:39:45 PM (9 months ago)
- Branches:
- master
- Children:
- a514fed
- Parents:
- a800a19
- Location:
- libcfa/src/collections
- Files:
-
- 4 edited
-
string.cfa (modified) (2 diffs)
-
string.hfa (modified) (5 diffs)
-
string_res.cfa (modified) (2 diffs)
-
string_res.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/collections/string.cfa
ra800a19 r30548de 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 11 08:31:21202513 // Update Count : 3 6912 // Last Modified On : Fri Apr 11 18:18:07 2025 13 // Update Count : 370 14 14 // 15 15 … … 234 234 } 235 235 236 istype & ?|?( istype & is, _Istream_Squote df ) {237 _Istream_Rquote df2 = { { f.sstr.s.inner, (_Istream_str_base)f.sstr } };236 istype & ?|?( istype & is, _Istream_Squote f ) { 237 _Istream_Rquote f2 = { { f.sstr.s.inner, (_Istream_str_base)f.sstr } }; 238 238 return is | f2; 239 239 } // ?|? -
libcfa/src/collections/string.hfa
ra800a19 r30548de 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Apr 11 08:28:27202513 // Update Count : 26 012 // Last Modified On : Fri Apr 11 18:13:35 2025 13 // Update Count : 261 14 14 // 15 15 … … 111 111 }; // _Istream_Swidth 112 112 113 struct _Istream_Squote d{113 struct _Istream_Squote { 114 114 _Istream_Swidth sstr; 115 }; // _Istream_Squote d115 }; // _Istream_Squote 116 116 117 117 struct _Istream_Sstr { … … 131 131 f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Sstr &)f; 132 132 } 133 _Istream_Squote d quoted( string & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {134 return (_Istream_Squote d)@{ { .s = s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };133 _Istream_Squote quote( string & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) { 134 return (_Istream_Squote)@{ { .s = s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } }; 135 135 } 136 _Istream_Squote d & quoted( _Istream_Swidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {136 _Istream_Squote & quote( _Istream_Swidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) { 137 137 f.delimiters[0] = Ldelimiter; f.delimiters[1] = Rdelimiter; f.delimiters[2] = '\0'; 138 return (_Istream_Squote d&)f;138 return (_Istream_Squote &)f; 139 139 } 140 140 // _Istream_Sstr incl( const char scanset[], string & s ) { return (_Istream_Sstr)@{ { .s = s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } } }; } … … 147 147 _Istream_Sstr ignore( string & s ) { return (_Istream_Sstr)@{ .s = s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; } 148 148 _Istream_Sstr & ignore( _Istream_Swidth & f ) { f.flags.ignore = true; return (_Istream_Sstr &)f; } 149 _Istream_Squote d & ignore( _Istream_Squoted & f ) { f.sstr.flags.ignore = true; return (_Istream_Squoted&)f; }149 _Istream_Squote & ignore( _Istream_Squote & f ) { f.sstr.flags.ignore = true; return (_Istream_Squote &)f; } 150 150 // _Istream_Sstr & ignore( _Istream_Sstr & f ) { f.sstr.flags.ignore = true; return (_Istream_Sstr &)f; } 151 151 _Istream_Sstr & ignore( _Istream_Sstr & f ) { f.flags.ignore = true; return (_Istream_Sstr &)f; } … … 153 153 154 154 forall( istype & | basic_istream( istype ) ) { 155 istype & ?|?( istype & is, _Istream_Squote df );155 istype & ?|?( istype & is, _Istream_Squote f ); 156 156 istype & ?|?( istype & is, _Istream_Sstr f ); 157 157 static inline istype & ?|?( istype & is, _Istream_Swidth f ) { return is | *(_Istream_Sstr *)&f; } -
libcfa/src/collections/string_res.cfa
ra800a19 r30548de 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 9 08:44:17202513 // Update Count : 12 812 // Last Modified On : Fri Apr 11 18:18:42 2025 13 // Update Count : 129 14 14 // 15 15 … … 249 249 250 250 forall( istype & | basic_istream( istype ) ) 251 istype & ?|?( istype & is, _Istream_Rquote df ) with( f.rstr ) {251 istype & ?|?( istype & is, _Istream_Rquote f ) with( f.rstr ) { 252 252 if ( eof( is ) ) throwResume ExceptionInst( end_of_file ); 253 253 int args; -
libcfa/src/collections/string_res.hfa
ra800a19 r30548de 10 10 // Created On : Fri Sep 03 11:00:00 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Apr 9 15:16:29202513 // Update Count : 7 612 // Last Modified On : Fri Apr 11 18:11:05 2025 13 // Update Count : 77 14 14 // 15 15 … … 132 132 }; // _Istream_Rwidth 133 133 134 struct _Istream_Rquote d{134 struct _Istream_Rquote { 135 135 // string_res * s; 136 136 // inline _Istream_str_base; 137 137 _Istream_Rwidth rstr; 138 }; // _Istream_Rquote d138 }; // _Istream_Rquote 139 139 140 140 struct _Istream_Rstr { … … 154 154 f.delimiters[0] = delimiter; f.delimiters[1] = '\0'; f.flags.delimiter = true; return (_Istream_Rstr &)f; 155 155 } 156 _Istream_Rquote d quoted( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) {157 return (_Istream_Rquote d)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } };158 } 159 _Istream_Rquote d & quoted( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) {156 _Istream_Rquote quote( string_res & s, const char Ldelimiter = '\"', const char Rdelimiter = '\0' ) { 157 return (_Istream_Rquote)@{ { .s = &s, { {.delimiters = { Ldelimiter, Rdelimiter, '\0' }}, .wd = -1, {.flags.rwd = true} } } }; 158 } 159 _Istream_Rquote & quote( _Istream_Rwidth & f, const char Ldelimiter = '"', const char Rdelimiter = '\0' ) { 160 160 f.delimiters[0] = Ldelimiter; f.delimiters[1] = Rdelimiter; f.delimiters[2] = '\0'; 161 return (_Istream_Rquote d&)f;161 return (_Istream_Rquote &)f; 162 162 } 163 163 _Istream_Rstr incl( const char scanset[], string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = scanset}, .wd = -1, {.flags.inex = false} } }; } … … 167 167 _Istream_Rstr ignore( string_res & s ) { return (_Istream_Rstr)@{ .s = &s, { {.scanset = 0p}, .wd = -1, {.flags.ignore = true} } }; } 168 168 _Istream_Rstr & ignore( _Istream_Rwidth & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; } 169 _Istream_Rquote d & ignore( _Istream_Rquoted & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquoted&)f; }169 _Istream_Rquote & ignore( _Istream_Rquote & f ) { f.rstr.flags.ignore = true; return (_Istream_Rquote &)f; } 170 170 _Istream_Rstr & ignore( _Istream_Rstr & f ) { f.flags.ignore = true; return (_Istream_Rstr &)f; } 171 171 } // distribution 172 172 forall( istype & | basic_istream( istype ) ) { 173 istype & ?|?( istype & is, _Istream_Rquote df );173 istype & ?|?( istype & is, _Istream_Rquote f ); 174 174 istype & ?|?( istype & is, _Istream_Rstr f ); 175 175 static inline istype & ?|?( istype & is, _Istream_Rwidth f ) { return is | *(_Istream_Rstr *)&f; }
Note:
See TracChangeset
for help on using the changeset viewer.