Update of /cvsroot/cpptool/rfta/include/xtl
In directory sc8-pr-cvs1:/tmp/cvs-serv29515/include/xtl
Modified Files:
CStringView.h
Log Message:
* added implicit cast to const char * on enumerators
* added setCurrent() method on enumerators.
Index: CStringView.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/xtl/CStringView.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CStringView.h 26 Apr 2003 21:10:27 -0000 1.3
--- CStringView.h 29 Apr 2003 22:02:14 -0000 1.4
***************
*** 199,202 ****
--- 199,217 ----
}
+ operator const char *() const
+ {
+ return current_;
+ }
+
+ void setCurrent( const char *current )
+ {
+ if ( current > string_.getEnd() )
+ current_ = string_.getEnd();
+ else if ( current_ < string_.getStart() )
+ current_ = string_.getStart();
+ else
+ current_ = current;
+ }
+
protected:
CStringView string_;
|