cscalar.h

Go to the documentation of this file.
00001 
00014 #ifndef CSCALAR_H_INCLUDED
00015 #define CSCALAR_H_INCLUDED
00016 
00017 #include <Coconut/coconut-sysdep.h>
00018 
00020 typedef enum {
00021         CSCALAR_TYPE_UNKNOWN,
00022         CSCALAR_TYPE_INT,
00023         CSCALAR_TYPE_DOUBLE,
00024         CSCALAR_TYPE_STR,
00025         CSCALAR_TYPE_PTR,
00026         CSCALAR_TYPE_OBJ
00027 } CScalarType ;
00028 
00034 @interface CScalar : NSObject 
00035 {
00037         CScalarType     scalar_type ;
00039         union {
00041                 int             v_int ;
00043                 double          v_double ;
00045                 NSString *      v_str ;
00047                 void *          v_ptr ;
00049                 id              v_obj ;
00050         } content ;
00051 }
00052 
00061   - init ;
00062   
00068   - (void) dealloc ;
00069 
00076   - clear ;
00077 
00084   - setIntVal: (int) src ;
00085 
00093   - (int) intVal ;
00094 
00101   - setDoubleVal: (double) src ;
00102 
00110   - (double) doubleVal ;
00111 
00118   - (void) setStr: (NSString *) src ;
00119 
00127   - (NSString *) str ;
00128 
00137   - (void) setPtr: (void *) ptr size: (size_t) size ;
00138 
00146   - (void *) ptr ;
00147 
00154   - setObj: (id) obj ;
00155 
00163   - (id) obj ;
00164 
00171   - debugPrint: (FILE *) fp ;
00172 @end
00173 
00174 #endif /* CSCALAR_H_INCLUDED */
00175 

Generated on Mon Mar 20 18:45:20 2006 for Coconut by  doxygen 1.4.6