Update of /cvsroot/plib/plib/src/psl
In directory usw-pr-cvs1:/tmp/cvs-serv20437
Modified Files:
psl.h pslContext.h
Log Message:
Again, changes for const-correctness
Index: psl.h
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/psl.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- psl.h 7 Sep 2002 07:00:35 -0000 1.9
+++ psl.h 7 Sep 2002 11:24:39 -0000 1.10
@@ -66,17 +66,17 @@
pslNumber () { t = PSL_VOID ; s = NULL ; }
- virtual void set ( int ) = 0 ;
- virtual void set ( float ) = 0 ;
- virtual void set ( const char * ) = 0 ;
- virtual void set ( pslNumber * ) = 0 ;
+ virtual void set ( int ) = 0 ;
+ virtual void set ( float ) = 0 ;
+ virtual void set ( const char * ) = 0 ;
+ virtual void set ( const pslNumber * ) = 0 ;
void reset () { t = PSL_VOID ; i = 0 ; delete [] s ; s = NULL ; }
- pslType getType () { return t ; }
+ pslType getType () const { return t ; }
void setType ( pslType _type ) { t = _type ; }
- int getInt ()
+ int getInt () const
{
switch ( t )
{
@@ -88,7 +88,7 @@
return 0 ;
}
- float getFloat ()
+ float getFloat () const
{
switch ( t )
{
@@ -100,7 +100,7 @@
return 0.0f ;
}
- char *getString ()
+ char *getString () const
{
switch ( t )
{
@@ -131,7 +131,7 @@
s = new char [ strlen(v)+1 ] ;
strcpy ( s, v ) ; }
- virtual void set ( pslNumber *v )
+ virtual void set ( const pslNumber *v )
{
t = v -> getType () ;
@@ -191,7 +191,7 @@
}
}
- virtual void set ( pslNumber *v )
+ virtual void set ( const pslNumber *v )
{
switch ( t )
{
Index: pslContext.h
===================================================================
RCS file: /cvsroot/plib/plib/src/psl/pslContext.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pslContext.h 7 Sep 2002 07:00:35 -0000 1.3
+++ pslContext.h 7 Sep 2002 11:24:39 -0000 1.4
@@ -46,10 +46,10 @@
~pslContext () {} ;
- void pushInt ( int x ) { stack [ sp++ ] . set ( x ) ; }
- void pushFloat ( float x ) { stack [ sp++ ] . set ( x ) ; }
- void pushString ( char *x ) { stack [ sp++ ] . set ( x ) ; }
- void pushNumber ( pslNumber *x ) { stack [ sp++ ] . set ( x ) ; }
+ void pushInt ( int x ) { stack [ sp++ ] . set ( x ) ; }
+ void pushFloat ( float x ) { stack [ sp++ ] . set ( x ) ; }
+ void pushString ( const char *x ) { stack [ sp++ ] . set ( x ) ; }
+ void pushNumber ( const pslNumber *x ) { stack [ sp++ ] . set ( x ) ; }
void popVoid () { --sp ; }
int popInt () { return stack [ --sp ] . getInt () ; }
|