glc_object.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  http://glc-lib.sourceforge.net
00006 
00007  GLC-lib is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU Lesser General Public License as published by
00009  the Free Software Foundation; either version 3 of the License, or
00010  (at your option) any later version.
00011 
00012  GLC-lib is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU Lesser General Public License for more details.
00016 
00017  You should have received a copy of the GNU Lesser General Public License
00018  along with GLC-lib; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 
00021 *****************************************************************************/
00022 
00024 
00025 #ifndef GLC_OBJECT_H_
00026 #define GLC_OBJECT_H_
00027 
00028 #include <QtOpenGL>
00029 #include <QString>
00030 #include <QUuid>
00031 #include <QMutex>
00032 #include "glc_global.h"
00033 
00034 #include "glc_config.h"
00035 
00038 
00045 
00046 
00047 class GLC_LIB_EXPORT GLC_Object
00048 {
00050 
00052 
00053 public:
00054 
00056 
00058         GLC_Object(const QString& name= QString());
00059 
00061         GLC_Object(GLC_uint id, const QString& name= QString());
00062 
00064         GLC_Object(const GLC_Object& sourceObject);
00065 
00067         virtual ~GLC_Object();
00069 
00071 
00073 
00074 public:
00076         inline GLC_uint id() const
00077         {return m_Uid;}
00078 
00080         inline const QString name() const
00081         {return m_Name;}
00082 
00084         inline bool operator == (const GLC_Object& obj)
00085         {return (m_Uid == obj.m_Uid) && (m_Name == obj.m_Name);}
00087 
00089 
00091 
00092 public:
00093 
00095 
00096         void setId(const GLC_uint id);
00097 
00099 
00100         void setName(const QString& name);
00101 
00103 
00104         GLC_Object &operator=(const GLC_Object&);
00105 
00107 
00108 
00110 // Protected member
00112 
00113 protected:
00115 
00116         GLC_uint m_Uid;
00117 
00119         QString m_Name;
00120 
00122         QMutex m_Mutex;
00123 };
00124 #endif //GLC_OBJECT_H_

SourceForge.net Logo

©2005-2011 Laurent Ribon