Overview   Class List   Class Hierarchy   Class Members   Functions & Constants   Defines   Header Files  

macros.h File Reference


Detailed Description

. Common Macros

-----------------------------------------------------------------------------

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

-----------------------------------------------------------------------------

--------------------------------------------------------------------------


Common macros

#define EXISTS(x)   ((x) != 0)
 check whether something exists (= is unequal to zero)
#define NOTEXISTS(x)   ((x) == 0)
 check whether something does not exist (= is zero)
#define DUMPHEX(ostr, addr, len)
 Dump in hex format (WORD16 units).
#define FOREVER   for(;;)
 a loop-forever statement

Useful macros

#define NUMBEROF(array)   (sizeof(array)/sizeof(array[0]))
 evaluate the number of elements in an array of any type
#define UIMA_STRINGIFY(s)   UIMA_IMP_STRINGIFY(s)
 stringification of macro argument.
#define UIMA_IMP_STRINGIFY(s)   # s

C++ Macros for compilers which do not support cast operators

#define STATIC_CAST(type, expr)   static_cast<type>(expr)
#define CONST_CAST(type, expr)   const_cast<type>(expr)
#define REINTERPRET_CAST(type, expr)   reinterpret_cast<type>(expr)
#define DYNAMIC_CAST(type, expr)   dynamic_cast<type>(expr)

Defines

#define UIMA_TPRINT(f)


Define Documentation

#define EXISTS  )     ((x) != 0)
 

check whether something exists (= is unequal to zero)

#define NOTEXISTS  )     ((x) == 0)
 

check whether something does not exist (= is zero)

#define DUMPHEX ostr,
addr,
len   ) 
 

Dump in hex format (WORD16 units).

#define FOREVER   for(;;)
 

a loop-forever statement

#define NUMBEROF array   )     (sizeof(array)/sizeof(array[0]))
 

evaluate the number of elements in an array of any type

#define UIMA_STRINGIFY  )     UIMA_IMP_STRINGIFY(s)
 

stringification of macro argument.

macro argument will be converted into string constant. if the argument itself is a macro, it will be expanded before stringification

#define UIMA_IMP_STRINGIFY  )     # s
 

#define UIMA_TPRINT  ) 
 

#define STATIC_CAST type,
expr   )     static_cast<type>(expr)
 

#define CONST_CAST type,
expr   )     const_cast<type>(expr)
 

#define REINTERPRET_CAST type,
expr   )     reinterpret_cast<type>(expr)
 

#define DYNAMIC_CAST type,
expr   )     dynamic_cast<type>(expr)
 


Generated on Mon Oct 1 16:04:12 2012 for UIMACPP API by  doxygen 1.3.9.1