Top   Types   Functions   Classes   Options   Index   Sources 

Options


These options shall be put in a file decls.h by the user. Most of the options are undefined by default. When you define a boolean option, always define it with a value of 1, since for checking the value, #if is used, not #ifdef.

Wrong:

#define Vector_MANY_CASTS

Right:

#define Vector_MANY_CASTS 1

You can force boolean values to 0 that are 1 by default by defining them to 0:

#define Vector_MANY_CASTS 0


List

CLASS_ID
CLASS_REFCOUNT
CLASS_REFCOUNT_FAKE
CLASS_USE_CGEN
HASH_STRENGTH
TYPE_INFO


Detailed Descriptions


HASH_STRENGTH

erwin/defs.h
#defineGlobal_ERWIN_HASH_STRENGTH2

This can have one of the following values:

0 - the weakest method: needs no additional data and is not really good. Only use this when memory is short.

1 - allocates 1kB of randomised data and hashes the lower 8 bits of all data types. Sufficient for most purposes.

2 - like 1, but hashes up to 32 bits of each data type. This is the default. You can try to check whether method 1 is faster. The hash function surely is, but due to weaker distribution, the hash performance in general may decrease in some rare cases (though it is expected that 1 is also a good method).

3 - like 2, but allocates 4kB of random data to have four different random tables for each byte in longer integer data types. Also, the string hashing functions make use of all four tables. This is the strongest, yet slowest method that also uses the most memory. It is usually overkill to use this.


TYPE_INFO

erwin/defs.h
#defineGlobal_ERWIN_TYPE_INFO0

Whether to include Erwin type info. See erwin/typeinfo.h for the definitions.


CLASS_REFCOUNT

erwin/classdef.h
#defineGlobal_ERWIN_CLASS_REFCOUNT1

Whether you want reference counting to be used by the macros 'abstract' and 'concrete'.


CLASS_REFCOUNT_FAKE

erwin/classdef.h
#defineGlobal_ERWIN_CLASS_REFCOUNT_FAKE0

Whether you want reference counting interface despite the fact that no refcounting in used. This may be good to keep an existing interface intact instead of removing some functions and macros.


CLASS_ID

erwin/classdef.h
#defineGlobal_ERWIN_CLASS_ID1

Whether you want unique class ids (via member function klass_id()).


CLASS_USE_CGEN

erwin/classdef.h
#defineGlobal_ERWIN_CLASS_USE_CGEN1

Whether erwin-cgen is used to generate the member functions in this file. Otherwise, inline versions are used. This slows down compilation, but the resulting program usually executes faster.

Note that some features that erwin-cgen provides cannot be emulated with inline functions. Notable the default result of the types of slots is not available in macros, so the macros may fail while the erwin-cgen generated stuff works and returns a default value (if desired).


Index

Stoppt die Vorratsdatenspeicherung
November 26th, 2007
Comments? Suggestions? Corrections? You can drop me a line.
zpentrabvagiktu@theiling.de
Schwerpunktpraxis