Main Page | Class List | File List | Class Members | File Members

CScalar Interface Reference

CScalar operates list of objects. More...

#import <cscalar.h>

List of all members.

Public Member Functions

(id) init
 Initialize scalar object.

(void) dealloc
 Release resource for the object.

(id) clear
 Release the content data.

(id) setIntVal:
 Set integer value.

(int) intVal
 Get int value of the content data.

(id) setDoubleVal:
 Set double value.

(double) doubleVal
 Get double value of the content data.

(void) setStr:
 Set string.

(NSString *) str
 Get string of the content data.

(void) setPtr:size:
 Set pointer.

(void *) ptr
 Get pointer value of the content data.

(id) setObj:
 Set object.

(id) obj
 Get object of the content data.

(id) debugPrint:
 Print the content of the data.


Protected Attributes

CScalarType scalar_type
union {
   int   v_int
   double   v_double
   NSString *   v_str
   void *   v_ptr
   id   v_obj
content


Detailed Description

CScalar operates list of objects.

Description
CScalar operates list of objects.


Member Function Documentation

- (id) CScalar:
 

Release the content data.

Returns:
Self pointer.
Description
Release the content data. The type will be int and value will be 0.

- (void) CScalar:
 

Release resource for the object.

Description
Release resource for the object.

- (id) CScalar: (id) 
(FILE *) 
(id)  fp
 

Print the content of the data.

Parameters:
fp Outut stream.
Description
Print the content of data.

- (double) CScalar:
 

Get double value of the content data.

Returns:
Double value.
Description
Get double value of the content data. If the content data is not double, this method returns 0.0.

- (id) CScalar:
 

Initialize scalar object.

Description
Initialize scalar object. The initial value is integer zero.
Returns:
The object itself.

- (int) CScalar:
 

Get int value of the content data.

Returns:
Int value.
Description
Get int value of the content data. If the content data is not int, this method returns 0.

- (id) CScalar:
 

Get object of the content data.

Returns:
Content object.
Description
Get object of the content data. If the content data is not object, this method returns nil.

- (void *) CScalar:
 

Get pointer value of the content data.

Returns:
Poiter of content data.
Description
Get pointer of the content data. If the content data is not pointer, this method returns null.

- (id) CScalar: (id) 
(double) 
(id)  src
 

Set double value.

Parameters:
src Double value.
Description
Set double value.

- (id) CScalar: (id) 
(int) 
(id)  src
 

Set integer value.

Parameters:
src Source int.
Description
Set integer value.

- (id) CScalar: (id) 
(id) 
(id)  obj
 

Set object.

Returns:
Self pointer.
Description
Set object to the object.

- (void) CScalar: (id) 
(void *) 
(id)  ptr
size: (id) 
(size_t) 
(id)  size
 

Set pointer.

Parameters:
ptr Source pointer. You can pass null.
size Size of the data. If you pass null as ptr, this value is forced to be zero.
Description
Set pointer to the object.

- (void) CScalar: (id) 
(NSString *) 
(id)  src
 

Set string.

Parameters:
src Source string.
Description
Set string to the object.

- (NSString *) CScalar:
 

Get string of the content data.

Returns:
String.
Description
Get string of the content data. If the content data is not string, this method returns null.


Member Data Documentation

union { ... } CScalar::content [protected]
 

Union for all scalar data

CScalarType CScalar::scalar_type [protected]
 

Type of scalar data

double CScalar::v_double [protected]
 

Double data

int CScalar::v_int [protected]
 

Integer data

id CScalar::v_obj [protected]
 

Object data

void* CScalar::v_ptr [protected]
 

Pointer data

NSString* CScalar::v_str [protected]
 

String data


The documentation for this interface was generated from the following file:
Generated on Wed Jul 14 18:34:59 2004 for Coconut by doxygen 1.3.6