CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
Standard.h File Reference

Platform/compiler detection and base portability macros for all of CMSDK. More...

#include <list>
#include <map>
#include <queue>
#include "bimap.h"
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#include <signal.h>
#include <stdlib.h>
#include <ctype.h>
Include dependency graph for Standard.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __LIBRARY_VERSION_STRING__   "2.0.0 Alpha1"
#define _SECURE_SCL   0
#define _SCL_SECURE_NO_DEPRECATE
#define _HAS_ITERATOR_DEBUGGING   0
#define clPI   3.14159265358979323846264
#define clmax(a, b)
#define clmin(a, b)
#define clround(x)
#define clsqr(x)
#define clsign(x)
#define clabs(a)
#define HAVE_TIMEZONE_VAR   1
#define ssscanf   sscanf
#define strnicmp   strncasecmp

Typedefs

typedef long long longlong
typedef long long __int64

Detailed Description

Platform/compiler detection and base portability macros for all of CMSDK.

Included (directly or indirectly) by every translation unit. It:

  • detects the platform and defines WINDOWS / LINUX / OSX+DARWIN / POCKETPC, ARCH_32 / ARCH_64, NATIVESYSTEMNAME and COMPILERVERSION;
  • defines small math convenience macros (clPI, clmax, clmin, clround, clsqr, clsign, clabs);
  • papers over libc differences (snprintf/sscanf_s, stricmp/strnicmp, longlong / __int64 typedefs, _open/_close);
  • pulls in the ubiquitous STL headers and bimap.h.

Keep this header free of heavyweight includes: it is the innermost dependency of the whole SDK.

Definition in file Standard.h.

Macro Definition Documentation

◆ __LIBRARY_VERSION_STRING__

#define __LIBRARY_VERSION_STRING__   "2.0.0 Alpha1"

Definition at line 27 of file Standard.h.

◆ _HAS_ITERATOR_DEBUGGING

#define _HAS_ITERATOR_DEBUGGING   0

Definition at line 33 of file Standard.h.

◆ _SCL_SECURE_NO_DEPRECATE

#define _SCL_SECURE_NO_DEPRECATE

Definition at line 32 of file Standard.h.

◆ _SECURE_SCL

#define _SECURE_SCL   0

Definition at line 31 of file Standard.h.

◆ clabs

#define clabs ( a)
Value:
((a)<0?-(a):(a))

Definition at line 119 of file Standard.h.

◆ clmax

#define clmax ( a,
b )
Value:
(((a) > (b)) ? (a) : (b))

Definition at line 114 of file Standard.h.

Referenced by cmlabs::MovingAverage::getSumMulti().

◆ clmin

#define clmin ( a,
b )
Value:
(((a) < (b)) ? (a) : (b))

Definition at line 115 of file Standard.h.

Referenced by cmlabs::ImageResizeDown().

◆ clPI

#define clPI   3.14159265358979323846264

Definition at line 113 of file Standard.h.

Referenced by cmlabs::Bitmap::drawLine().

◆ clround

#define clround ( x)
Value:
(int) (((x) - floor(x)) >= 0.5 ? (floor(x) + 1) : (floor(x)))

Definition at line 116 of file Standard.h.

◆ clsign

#define clsign ( x)
Value:
(((x) < 0) ? (-1) : (1))

Definition at line 118 of file Standard.h.

◆ clsqr

#define clsqr ( x)
Value:
((x) * (x))

Definition at line 117 of file Standard.h.

◆ HAVE_TIMEZONE_VAR

#define HAVE_TIMEZONE_VAR   1

Definition at line 186 of file Standard.h.

◆ ssscanf

#define ssscanf   sscanf

Definition at line 187 of file Standard.h.

◆ strnicmp

#define strnicmp   strncasecmp

Definition at line 188 of file Standard.h.

Referenced by cmlabs::utils::laststristr().

Typedef Documentation

◆ __int64

typedef long long __int64

Definition at line 183 of file Standard.h.

◆ longlong

typedef long long longlong

Definition at line 171 of file Standard.h.