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  Version 2.0.0 Beta 1, packaged on April 2010.
00006 
00007  http://glc-lib.sourceforge.net
00008 
00009  GLC-lib is free software; you can redistribute it and/or modify
00010  it under the terms of the GNU General Public License as published by
00011  the Free Software Foundation; either version 2 of the License, or
00012  (at your option) any later version.
00013 
00014  GLC-lib is distributed in the hope that it will be useful,
00015  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  GNU General Public License for more details.
00018 
00019  You should have received a copy of the GNU General Public License
00020  along with GLC-lib; if not, write to the Free Software
00021  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00022 
00023 *****************************************************************************/
00024 
00026 
00027 #ifndef GLC_OBJECT_H_
00028 #define GLC_OBJECT_H_
00029 
00030 #include <QtOpenGL>
00031 #include <QString>
00032 #include <QUuid>
00033 #include <QMutex>
00034 #include "glc_global.h"
00035 
00036 #include "glc_config.h"
00037 
00040 
00047 
00048 
00049 class GLC_LIB_EXPORT GLC_Object
00050 {
00052 
00054 
00055 public:
00056 
00058 
00060         GLC_Object(const QString& name= QString());
00061 
00063         GLC_Object(const GLC_Object& sourceObject);
00064 
00066         virtual ~GLC_Object();
00068 
00070 
00072 
00073 public:
00075         inline GLC_uint id() const
00076         {return m_Uid;}
00077 
00079         inline const QString name() const
00080         {return m_Name;}
00081 
00083         inline bool operator == (const GLC_Object& obj)
00084         {return (m_Uid == obj.m_Uid) && (m_Name == obj.m_Name);}
00086 
00088 
00090 
00091 public:
00092 
00094 
00095         void setId(const GLC_uint id);
00096 
00098 
00099         void setName(const QString& name);
00100 
00102 
00103         GLC_Object &operator=(const GLC_Object&);
00104 
00106 
00107 
00109 // Protected member
00111 
00112 protected:
00114 
00115         GLC_uint m_Uid;
00116 
00118         QString m_Name;
00119 
00121         QMutex m_Mutex;
00122 };
00123 #endif //GLC_OBJECT_H_

SourceForge.net Logo

©2005 Laurent Ribon