itom 2.2.1
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2016, Institut fuer Technische Optik (ITO), 00005 Universitaet Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut fuer Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 #ifndef SHAREDSTRUCTURES_H 00029 #define SHAREDSTRUCTURES_H 00030 00031 /* includes */ 00032 #include "typeDefs.h" 00033 #include "retVal.h" 00034 #include "param.h" 00035 00036 /* definition and macros */ 00037 /* global variables (avoid) */ 00038 /* content */ 00039 00040 namespace ito 00041 { 00042 #define CREATEVERSION(major,minor,patch) (major << 16) + (minor << 8) + patch 00043 #define MAJORVERSION(version) version >> 16 00044 #define MINORVERSION(version) (version >> 8) - (MAJORVERSION(version) << 8) 00045 #define PATCHVERSION(version) version - ((version >> 8) << 8) 00046 #define MAXVERSION CREATEVERSION(999999,0,0) //maximum possible version (that means no maximum version is indicated) 00047 #define MINVERSION CREATEVERSION(0,0,0) //minimum possible version 00048 00049 #define DELETE_AND_SET_NULL(pointer) if(pointer != NULL) { delete pointer; pointer = NULL;}; 00050 #define DELETE_AND_SET_NULL_ARRAY(pointer) if(pointer != NULL) { delete[] pointer; pointer = NULL;}; 00051 00052 #define ItomDoc_VAR(name) static char name[] 00053 #define ItomDoc_STRVAR(name,str) ItomDoc_VAR(name) = str 00054 00055 } //end namespace ito 00056 00057 #endif