Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

ZincInternal.hpp File Reference

#include <string>
#include "ZincObjects.hpp"

Go to the source code of this file.

Defines

#define MAX_NUM_LENGTH   32
#define Z_TCLCB   "zincTclCb"
#define Z_BOO_POOL(no, value)   ( Tcl_SetBooleanObj (pool[no], value), pool[no] )
#define Z_INT_POOL(no, value)   ( Tcl_SetIntObj (pool[no], value), pool[no] )
#define Z_DBL_POOL(no, value)   ( Tcl_SetDoubleObj (pool[no], value), pool[no] )
#define Z_STR_POOL(no, value, length)
#define Z_LST_POOL(no, value, size)
#define Z_CLEANLIST(no)   Tcl_SetIntObj (pool[no], 0)
#define Z_DEFINE_ZOPT(string)   Tcl_Obj* ZOPT_##string = Tcl_NewStringObj ("-" #string, -1);
#define Z_DEFINE_ZFCT(string)   Tcl_Obj* ZFCT_##string = Tcl_NewStringObj (#string, -1);
#define Z_DEFINE_ZITM(string)   Tcl_Obj* ZITM_##string = Tcl_NewStringObj (#string, -1);
#define Z_PARENTGROUP(parentGroup)   ( (parentGroup != NULL) ? parentGroup->object : DEFAULT_GROUP_OBJ );

Functions

std::string itos (int integer)
std::string ltos (long l)
std::string dtos (double d)


Define Documentation

#define MAX_NUM_LENGTH   32
 

ZincInternal.hpp zinclib

This software is the property of IntuiLab SA, France. See at the end of the file for the complete copyright notice

Here we defines macros and constants that are only used within Zinclib code

08/03/05

Contributors: Benoit Peccatte <peccatte@intuilab.com> David Thevenin <thevenin@intuilab.com>

#define Z_BOO_POOL no,
value   )     ( Tcl_SetBooleanObj (pool[no], value), pool[no] )
 

These are macro for shortness and readability of code. They take one Tcl_Obj from the pool and put one value into it. This object is returned. They all have the same signature.

Parameters:
no the id of the Tcl_Obj to take within the pool (max is ZINC_POOL_COUNT-1)
value the value to put in the extracted object
Returns:
the object from the pool

#define Z_CLEANLIST no   )     Tcl_SetIntObj (pool[no], 0)
 

Clear a list object. Tcl_Obj used in a list object have a refcount incremented and as such can't be reused for anything else. To free those object you need to clean the list object after use.

Parameters:
no the id of a Tcl_Obj within the pool which contains a list to clear

#define Z_DBL_POOL no,
value   )     ( Tcl_SetDoubleObj (pool[no], value), pool[no] )
 

#define Z_DEFINE_ZFCT string   )     Tcl_Obj* ZFCT_##string = Tcl_NewStringObj (#string, -1);
 

#define Z_DEFINE_ZITM string   )     Tcl_Obj* ZITM_##string = Tcl_NewStringObj (#string, -1);
 

#define Z_DEFINE_ZOPT string   )     Tcl_Obj* ZOPT_##string = Tcl_NewStringObj ("-" #string, -1);
 

Create a constant Tcl_Obj that can be reused as a parameter later

string define the name and the value ov the object

#define Z_INT_POOL no,
value   )     ( Tcl_SetIntObj (pool[no], value), pool[no] )
 

#define Z_LST_POOL no,
value,
size   ) 
 

Value:

( Tcl_SetListObj (pool[no], size, value),\
                                      pool[no] )
Make a list object

Parameters:
no the id of the Tcl_Obj to take within the pool
value a table of pointer to Tcl_Obj to put in the list
size the number objects in the table
Returns:
the list object from the pool

#define Z_PARENTGROUP parentGroup   )     ( (parentGroup != NULL) ? parentGroup->object : DEFAULT_GROUP_OBJ );
 

Macro to return a parentGroup Tcl_Obj. If a NULL is group given, it returns the default one.

Parameters:
parentGroup the parent group to take

#define Z_STR_POOL no,
value,
length   ) 
 

Value:

( Tcl_SetStringObj (pool[no],       \
                                                          value, length), \
                                        pool[no] )

#define Z_TCLCB   "zincTclCb"
 


Function Documentation

std::string dtos double  d  )  [inline]
 

Convert a double to a string

Parameters:
double the integer to convert

std::string itos int  integer  )  [inline]
 

Convert an integer to a string

Parameters:
integer the integer to convert

std::string ltos long  l  )  [inline]
 

Convert a long to a string

Parameters:
l the long to convert


Generated on Mon Apr 18 17:40:44 2005 for IntuiKit by doxygen 1.3.3