All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
clst.h File Reference
#include <stdio.h>
#include "host.h"
#include "serialis.h"
#include "lsterr.h"

Go to the source code of this file.

Classes

class  CLIST_LINK
 
class  CLIST
 
class  CLIST_ITERATOR
 

Macros

#define QUOTE_IT(parm)   #parm
 
#define CLISTIZEH_A(CLASSNAME)
 
#define CLISTIZEH_B(CLASSNAME)
 
#define CLISTIZEH_C(CLASSNAME)
 
#define CLISTIZEH(CLASSNAME)
 
#define CLISTIZE(CLASSNAME)
 

Macro Definition Documentation

#define CLISTIZE (   CLASSNAME)
Value:
\
/*********************************************************************** \
* CLASSNAME##_c1_zapper \
* \
* A function which can delete a CLASSNAME element. This is passed to the \
* generic deep_clear list member function so that when a list is cleared the \
* elements on the list are properly destroyed from the base class, even \
* though we dont use a virtual destructor function. \
**********************************************************************/ \
\
DLLSYM void CLASSNAME##_c1_zapper( /*delete a link*/ \
void* link) /*link to delete*/ \
{ \
delete (CLASSNAME *) link; \
} \
#define DLLSYM
Definition: platform.h:25

Definition at line 958 of file clst.h.

#define CLISTIZEH (   CLASSNAME)
Value:
CLISTIZEH_A( CLASSNAME ) \
CLISTIZEH_B( CLASSNAME ) \
CLISTIZEH_C( CLASSNAME )
#define CLISTIZEH_A(CLASSNAME)
Definition: clst.h:865
#define CLISTIZEH_B(CLASSNAME)
Definition: clst.h:873
#define CLISTIZEH_C(CLASSNAME)
Definition: clst.h:901

Definition at line 946 of file clst.h.

#define CLISTIZEH_A (   CLASSNAME)
Value:
\
extern DLLSYM void CLASSNAME##_c1_zapper( /*delete a link*/ \
void* link); /*link to delete*/ \
\
extern DLLSYM void* CLASSNAME##_c1_copier( /*deep copy a link*/ \
void* old_element); /*source link */
#define DLLSYM
Definition: platform.h:25

Definition at line 865 of file clst.h.

#define CLISTIZEH_B (   CLASSNAME)
Value:
\
/*********************************************************************** \
* CLASS - CLASSNAME##_CLIST \
* \
* List class for class CLASSNAME \
* \
**********************************************************************/ \
\
class DLLSYM CLASSNAME##_CLIST : public CLIST \
{ \
public: \
CLASSNAME##_CLIST():CLIST() {} \
/* constructor */ \
\
CLASSNAME##_CLIST( /* dont construct */ \
const CLASSNAME##_CLIST&) /*by initial assign*/ \
{ DONT_CONSTRUCT_LIST_BY_COPY.error( QUOTE_IT( CLASSNAME##_CLIST ), \
ABORT, NULL ); } \
\
void deep_clear() /* delete elements */ \
{ CLIST::internal_deep_clear( &CLASSNAME##_c1_zapper ); } \
\
void operator=( /* prevent assign */ \
const CLASSNAME##_CLIST&) \
{ DONT_ASSIGN_LISTS.error( QUOTE_IT( CLASSNAME##_CLIST ), \
ABORT, NULL ); }
#define QUOTE_IT(parm)
Definition: clst.h:831
Definition: clst.h:70
const ERRCODE DONT_ASSIGN_LISTS
Definition: lsterr.h:27
Definition: errcode.h:30
void error(const char *caller, TessErrorLogCode action, const char *format,...) const
Definition: errcode.cpp:40
void internal_deep_clear(void(*zapper)(void *))
Definition: clst.cpp:41
#define NULL
Definition: host.h:144
#define DLLSYM
Definition: platform.h:25
const ERRCODE DONT_CONSTRUCT_LIST_BY_COPY
Definition: lsterr.h:25

Definition at line 873 of file clst.h.

#define CLISTIZEH_C (   CLASSNAME)

Definition at line 901 of file clst.h.

#define QUOTE_IT (   parm)    #parm

Definition at line 831 of file clst.h.