Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Macros
CoreMacros.h File Reference

basic macro collection More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NULL   0
 
#define MAX(x, y)   ( ( ( x ) < ( y ) ) ? ( y ) : ( x ) )
 
#define MIN(x, y)   ( ( ( x ) > ( y ) ) ? ( y ) : ( x ) )
 
#define CLAMP(x, low, high)   MIN( high, MAX( x, low ) )
 
#define ABS(v)   ( ( v ) < 0 ? - ( v ) : ( v ) )
 
#define RANGE(x, y)   ( ( ( x ) < ( y ) ) ? ( y - x ) : ( x - y ) )
 
#define CIRCULAR_LEFT_SHIFT(v, bits)   ( ( ( v ) << ( bits ) ) | ( ( v ) >> ( ( sizeof( v ) * 8 ) - ( bits ) ) ) )
 
#define CIRCULAR_RIGHT_SHIFT(v, bits)   ( ( ( v ) >> ( bits ) ) | ( ( v ) << ( ( sizeof( v ) * 8 ) - ( bits ) ) ) )
 
#define DIR_SEPARATOR   "\\"
 
#define DIR_SEPARATOR_CHAR   '\\'
 
#define PATH_SEPARATOR   ";"
 
#define PATH_SEPARATOR_CHAR   ';'
 
#define NEW_LINE   "\r\n"
 
#define NVL(checkVal, replaceVal)   ( ( ( checkVal ) == NULL ) ? ( replaceVal ) : ( checkVal ) )
 

Detailed Description

basic macro collection

Author
S.Tanaka
Date
2006.07.24

Copyright(C) 2006-2014 Eisai Co., Ltd. All rights reserved.

Definition in file CoreMacros.h.

Macro Definition Documentation

#define ABS (   v)    ( ( v ) < 0 ? - ( v ) : ( v ) )

get absolute value

Definition at line 38 of file CoreMacros.h.

#define CIRCULAR_LEFT_SHIFT (   v,
  bits 
)    ( ( ( v ) << ( bits ) ) | ( ( v ) >> ( ( sizeof( v ) * 8 ) - ( bits ) ) ) )

circular left shift

Definition at line 48 of file CoreMacros.h.

#define CIRCULAR_RIGHT_SHIFT (   v,
  bits 
)    ( ( ( v ) >> ( bits ) ) | ( ( v ) << ( ( sizeof( v ) * 8 ) - ( bits ) ) ) )

circular right shift

Definition at line 51 of file CoreMacros.h.

#define CLAMP (   x,
  low,
  high 
)    MIN( high, MAX( x, low ) )

If x is greater than high, the value is high. If x is less than low, the value is low. Bisides the value is x.

Definition at line 35 of file CoreMacros.h.

#define DIR_SEPARATOR   "\\"

the system-dependent default name separator charactor, represented as a string

Definition at line 77 of file CoreMacros.h.

#define DIR_SEPARATOR_CHAR   '\\'

the system-dependent default name separator charactor

Definition at line 80 of file CoreMacros.h.

#define MAX (   x,
 
)    ( ( ( x ) < ( y ) ) ? ( y ) : ( x ) )

get max value

Definition at line 27 of file CoreMacros.h.

#define MIN (   x,
 
)    ( ( ( x ) > ( y ) ) ? ( y ) : ( x ) )

get min value

Definition at line 30 of file CoreMacros.h.

#define NEW_LINE   "\r\n"

new line string

Definition at line 89 of file CoreMacros.h.

#define NULL   0

NULL

Definition at line 18 of file CoreMacros.h.

#define NVL (   checkVal,
  replaceVal 
)    ( ( ( checkVal ) == NULL ) ? ( replaceVal ) : ( checkVal ) )

NULL Test

Definition at line 99 of file CoreMacros.h.

#define PATH_SEPARATOR   ";"

the system-dependent default path separator charactor, represented as a string

Definition at line 83 of file CoreMacros.h.

#define PATH_SEPARATOR_CHAR   ';'

the system-dependent default path separator charactor

Definition at line 86 of file CoreMacros.h.

#define RANGE (   x,
 
)    ( ( ( x ) < ( y ) ) ? ( y - x ) : ( x - y ) )

get range of 2 values

Definition at line 40 of file CoreMacros.h.