artefaktur
software engineer &        architecture

 
 
 
 

acdkplatformmacros

Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

ACDK Platform macros


Detailed Description

Platform macros identifies the used compiler or platform under which ACDK will be compiled.


Defines

#define ACDK_SUPPORT_ANSI_SPECIALIZATION
 ACDK_SUPPORT_ANSI_SPECIALIZATION use template <> void foo(char c) instead of template void foo(char c).

#define ACDK_HAS_ALTERNATIVE_TOKEN
 and,or,xor, etc.

#define ACDK_ALT_CALL_TEMPLATED_FUNCTION
 is defined if compiler needs explicite type in function templates
  template <class T> void foo()
  {
    T dummy;
#ifdef ACDK_ALT_CALL_TEMPLATED_FUNCTION
    anotherMemberTemplate<T>(dummy);
#else
    anotherMemberTemplate(dummy);
#endif
  }


#define ACDK_NEED_FQ_SUPER_QUALIFIER
 If reference to super class needs fully qualified name
  namspace somewhere {
  class A
  {
    void foo() { }
  };
  }
  class B : public somewhere::A
  {
    void foo()
    {
#ifdef ACDK_NEED_FQ_SUPER_QUALIFIER
      somewhere::A::foo();
#else
      A::foo();
#endif
    }
  };
.

#define ACDK_MEMBERTEMPL_TEMPLATE_TEMPLATE
 See code example.

#define template_static   static
 template_static is used to mark a template member function as static.

#define ACDK_NO_NULLPOINTER_CHECKING
 is defined if null pointer checking will be done by structured C exception or signal handling

#define ACDK_NEED_DLLEXPORT
 is defined if platform need to export shared library symbols (Windows)

#define ACDK_HAS_USER_DEFINDED_OPERATOR_DELETE
 is defined if compiler supports user defined delete operator

#define ACDK_HAS_STRUCT_TIMEVAL
 is defined if compiler include has struct timeval

#define ACDK_HAVE_LONG_LONG
 is defined if compiler has long long type

#define ACDK_DLL_EXPORT   __declspec(dllexport)
 Used to export a member/method/class from a DLL/SO.

#define ACDK_DLL_IMPORT   __declspec(dllimport)
 Used to import a member/method/class from a DLL/SO.

#define ACDK_DLL_PRIVATE
 Used to hide symbol from exported symbols (private to DLL/SO).

#define ACDK_FQ_SUPER_QUALIFIER(namespace, class)   namespace class
 ACDK_FQ_SUPER_QUALIFIER is a helper macro to select super class in initialization list:
  struct A : public ::otherns::B
  {
    A() : ACDK_FQ_SUPER_QUALIFIER(::otherns::, B()) { }
  };
.

#define ACDK_ST
 compile acdk with no multithreading support

#define ACDK_NOMETAINFO
 if ACDK_NOMETAINFO is defined, all functionality regarding Metainformation, acdk/lang/Class and acdk/lang/reflect/ * will be deactivated.

#define ACDK_CHECKBADCAST(condition, excode)   do { } while(false)
 if ACDK_NO_BADCAST_CHECKING is defined, no ClassCastException will be thrown.

#define ACDK_CAST_PTR2INT(ptr)   (int)(jlong)((void*)ptr)
 internal macro to cast from pointer to a int

#define ACDK_CAST_INT2PTR(T, ival)   (T*)(jlong)(ival)
 internal macro to cast from an integer type (jlong) to a pointer.

#define aligned(size)   (((size) + (8 - 1)) & ~(8 - 1))
 returned the size with aligment.

#define ALIGNEDSIZEOF(o)   aligned(sizeof(o))
 returns the machine aligned size

#define ACDK_OS_WIN32
 Compiled under Microsoft Windows platform.

#define ACDK_OS_CYGWIN32
 Compiled under Microsoft Windows platform using gcc and the cygwin runtime environment.

#define ACDK_OS_BSD
 Compiled FreeBSD.

#define ACDK_OS_LINUX
 Compiled under Linux.

#define ACDK_OS_SOLARIS
 Compiled under Sun Solaris.

#define ACDK_OS_DARWIN
 Compiled under Mac OS X/Darwin.

#define ACDK_OS_UNIX
 Compiled under a unix flavor operation system (Linux, Solaris, FreeBSD).

#define ACDK_BIGENDIAN   1
 Compiled under cpu platform with big endian byte order.

#define ACDK_LITTLEENDIAN
 Compiled under cpu platform with little endian byte order.

#define ACDK_MAX_PATH   1024
 maximum character length of a path name

#define ACDK_UCLITERAL_WIDE   2
 number of wide character supports by native os calls is 2 or 4

#define POSIX_THREADS
 Using posix thread library.

#define WIN32_THREADS
 Using win32 thread api.

#define ACDK_64_BIT_PTR
 is defined if the platform pointer has 64 bit

#define ACDK_MAJOR_VERSION   4
 defines the major ACDK version

#define ACDK_MINOR_VERSION   14
 defines the minor ACDK version

#define ACDK_RELEASE_VERSION   0
 defines the release number

#define ACDK_VERSION_STRING   ACDK 4.14.0
 acdk version as string

#define ACDK_CHECK_VERSION(Major, Minor, Release)
 Macro to check for version compatibility.


Define Documentation

#define ACDK_64_BIT_PTR
 

is defined if the platform pointer has 64 bit

#define ACDK_ALT_CALL_TEMPLATED_FUNCTION
 

is defined if compiler needs explicite type in function templates

  template <class T> void foo()
  {
    T dummy;
#ifdef ACDK_ALT_CALL_TEMPLATED_FUNCTION
    anotherMemberTemplate<T>(dummy);
#else
    anotherMemberTemplate(dummy);
#endif
  }

#define ACDK_BIGENDIAN   1
 

Compiled under cpu platform with big endian byte order.

#define ACDK_CAST_INT2PTR T,
ival   )     (T*)(jlong)(ival)
 

internal macro to cast from an integer type (jlong) to a pointer.

#define ACDK_CAST_PTR2INT ptr   )     (int)(jlong)((void*)ptr)
 

internal macro to cast from pointer to a int

#define ACDK_CHECK_VERSION Major,
Minor,
Release   ) 
 

Value:

(ACDK_MAJOR_VERSION > (Major) || \
    (ACDK_MAJOR_VERSION == (Major) && ACDK_MINOR_VERSION > (Minor)) || \
    (ACDK_MAJOR_VERSION == (Major) && ACDK_MINOR_VERSION == (Minor) && ACDK_RELEASE_VERSION >= (Release)))
Macro to check for version compatibility.

#define ACDK_CHECKBADCAST condition,
excode   )     do { } while(false)
 

if ACDK_NO_BADCAST_CHECKING is defined, no ClassCastException will be thrown.

Set this only, if you are sure, that your code has no casting errors.

#define ACDK_DLL_EXPORT   __declspec(dllexport)
 

Used to export a member/method/class from a DLL/SO.

#define ACDK_DLL_IMPORT   __declspec(dllimport)
 

Used to import a member/method/class from a DLL/SO.

#define ACDK_DLL_PRIVATE
 

Used to hide symbol from exported symbols (private to DLL/SO).

This will probably be supported by gcc 4.x

#define ACDK_FQ_SUPER_QUALIFIER namespace,
class   )     namespace class
 

ACDK_FQ_SUPER_QUALIFIER is a helper macro to select super class in initialization list:

  struct A : public ::otherns::B
  {
    A() : ACDK_FQ_SUPER_QUALIFIER(::otherns::, B()) { }
  };
.

See also:
ACDK_NEED_FQ_SUPER_QUALIFIER

#define ACDK_HAS_ALTERNATIVE_TOKEN
 

and,or,xor, etc.

are reserved token

#define ACDK_HAS_STRUCT_TIMEVAL
 

is defined if compiler include has struct timeval

#define ACDK_HAS_USER_DEFINDED_OPERATOR_DELETE
 

is defined if compiler supports user defined delete operator

#define ACDK_HAVE_LONG_LONG
 

is defined if compiler has long long type

#define ACDK_LITTLEENDIAN
 

Compiled under cpu platform with little endian byte order.

#define ACDK_MAJOR_VERSION   4
 

defines the major ACDK version

#define ACDK_MAX_PATH   1024
 

maximum character length of a path name

#define ACDK_MEMBERTEMPL_TEMPLATE_TEMPLATE
 

See code example.

template <class A>
struct X
{
  template <class B> void foo(B& b);
};

#if defined(ACDK_MEMBERTEMPL_TEMPLATE_TEMPLATE)
template <class A> template <class B>
#else
template <class A, class B>
#endif
void X<A>::foo(B& b) {}

#define ACDK_MINOR_VERSION   14
 

defines the minor ACDK version

#define ACDK_NEED_DLLEXPORT
 

is defined if platform need to export shared library symbols (Windows)

#define ACDK_NEED_FQ_SUPER_QUALIFIER
 

If reference to super class needs fully qualified name

  namspace somewhere {
  class A
  {
    void foo() { }
  };
  }
  class B : public somewhere::A
  {
    void foo()
    {
#ifdef ACDK_NEED_FQ_SUPER_QUALIFIER
      somewhere::A::foo();
#else
      A::foo();
#endif
    }
  };
.

#define ACDK_NO_NULLPOINTER_CHECKING
 

is defined if null pointer checking will be done by structured C exception or signal handling

#define ACDK_NOMETAINFO
 

if ACDK_NOMETAINFO is defined, all functionality regarding Metainformation, acdk/lang/Class and acdk/lang/reflect/ * will be deactivated.

In normal case you should not define this, until you want to have a tiny static version of the acdk library.

#define ACDK_OS_BSD
 

Compiled FreeBSD.

#define ACDK_OS_CYGWIN32
 

Compiled under Microsoft Windows platform using gcc and the cygwin runtime environment.

#define ACDK_OS_DARWIN
 

Compiled under Mac OS X/Darwin.

#define ACDK_OS_LINUX
 

Compiled under Linux.

#define ACDK_OS_SOLARIS
 

Compiled under Sun Solaris.

#define ACDK_OS_UNIX
 

Compiled under a unix flavor operation system (Linux, Solaris, FreeBSD).

#define ACDK_OS_WIN32
 

Compiled under Microsoft Windows platform.

#define ACDK_RELEASE_VERSION   0
 

defines the release number

#define ACDK_ST
 

compile acdk with no multithreading support

#define ACDK_SUPPORT_ANSI_SPECIALIZATION
 

ACDK_SUPPORT_ANSI_SPECIALIZATION use template <> void foo(char c) instead of template void foo(char c).

#define ACDK_UCLITERAL_WIDE   2
 

number of wide character supports by native os calls is 2 or 4

#define ACDK_VERSION_STRING   ACDK 4.14.0
 

acdk version as string

#define aligned size   )     (((size) + (8 - 1)) & ~(8 - 1))
 

returned the size with aligment.

On sparc pointer should be aligned to 8 bytes.

#define ALIGNEDSIZEOF  )     aligned(sizeof(o))
 

returns the machine aligned size

See also:
aligned(size)

#define POSIX_THREADS
 

Using posix thread library.

#define template_static   static
 

template_static is used to mark a template member function as static.

#define WIN32_THREADS
 

Using win32 thread api.

 
Last modified 2005-05-08 18:34 by SYSTEM By Artefaktur, Ing. Bureau Kommer