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 ITOMPLOTHANDLE_H 00029 #define ITOMPLOTHANDLE_H 00030 00031 #ifdef __APPLE__ 00032 extern "C++" { 00033 #endif 00034 00035 /* includes */ 00036 #include "commonGlobal.h" 00037 #include <string> 00038 00039 namespace ito 00040 { 00041 00042 //---------------------------------------------------------------------------------------------------------------------------------- 00048 class ItomPlotHandle 00049 { 00050 public: 00051 ItomPlotHandle() 00052 { 00053 m_objectID = 0; 00054 m_pObjName = ""; 00055 m_pWidgetClassName = ""; 00056 } 00057 explicit ItomPlotHandle(const char* objName, const char* widgetClassName, const unsigned int objectID) 00058 { 00059 m_objectID = objectID; 00060 if(objName) m_pObjName = std::string(objName); 00061 else m_pObjName = ""; 00062 00063 if(widgetClassName) m_pWidgetClassName = std::string(widgetClassName); 00064 else m_pWidgetClassName = ""; 00065 00066 } 00067 ItomPlotHandle(const ItomPlotHandle &rhs) 00068 { 00069 m_objectID = rhs.m_objectID; 00070 m_pObjName = rhs.m_pObjName; 00071 m_pWidgetClassName = rhs.m_pWidgetClassName; 00072 } 00073 00074 ~ItomPlotHandle() 00075 { 00076 m_pObjName = ""; 00077 m_pWidgetClassName = ""; 00078 m_objectID = 0; 00079 } 00080 00081 inline std::string getObjName() const { return m_pObjName;} 00082 inline std::string getWidgetClassName() const { return m_pWidgetClassName;} 00083 inline unsigned int getObjectID() const { return m_objectID;} 00084 private: 00085 std::string m_pObjName; 00086 std::string m_pWidgetClassName; 00087 unsigned int m_objectID; 00088 }; 00089 00090 } //end namespace ito 00091 00092 #ifdef __APPLE__ 00093 } 00094 #endif 00095 00096 #endif