ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/io/LinkedAssign.hpp
Revision: 1490
Committed: Fri Sep 24 04:16:43 2004 UTC (19 years, 9 months ago) by gezelter
File size: 1133 byte(s)
Log Message:
Import of OOPSE v. 2.0

File Contents

# Content
1 #ifndef __LINKEDASSIGN_H__
2 #define __LINKEDASSIGN_H__
3
4 class LinkedAssign{
5
6 public:
7 LinkedAssign() { next = NULL; }
8 LinkedAssign( char* the_text, int the_ival );
9 LinkedAssign( char* the_text, double the_dval );
10 LinkedAssign( char* the_text, char* the_sval );
11 ~LinkedAssign(){ if( next != NULL ) delete next; }
12
13
14 void setValues( char* the_text, int the_ival );
15 void setValues( char* the_text, double the_dval );
16 void setValues( char* the_text, char* the_sval );
17 void add( char* the_text, int the_ival );
18 void add( char* the_text, double the_dval );
19 void add( char* the_text, char* the_sval );
20
21 char* getlhs( void ) { return text; }
22 short int getType( void ) { return type; }
23 int getInt( void ) { return ival; }
24 double getDouble( void ) { return dval; }
25 char* getString( void ) { return sval; }
26 void setNext( LinkedAssign* the_next ) { next = the_next; }
27 LinkedAssign* getNext( void ) { return next; }
28
29 LinkedAssign* find( char* key );
30
31 private:
32 char text[100];
33 int ival;
34 double dval;
35 char sval[100];
36 short int type; // 0 = int, 1 = double, 2 = string
37 LinkedAssign* next;
38 };
39
40 #endif