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 #include "glc_object.h" 00026 00028 // Constructor/Destructor 00030 00031 GLC_Object::GLC_Object(const QString& name) 00032 : m_Uid(glc::GLC_GenID()) // Object ID 00033 , m_Name(name) // Object Name 00034 { 00035 00036 } 00037 00038 GLC_Object::GLC_Object(const GLC_Object& sourceObject) 00039 : m_Uid(sourceObject.m_Uid) 00040 , m_Name(sourceObject.m_Name) 00041 { 00042 } 00043 00044 GLC_Object::~GLC_Object() 00045 { 00046 00047 } 00048 00049 00051 // Set function 00053 00054 void GLC_Object::setId(const GLC_uint id) 00055 { 00056 QMutexLocker mutexLocker(&m_Mutex); 00057 m_Uid= id; 00058 } 00059 00060 void GLC_Object::setName(const QString& name) 00061 { 00062 QMutexLocker mutexLocker(&m_Mutex); 00063 m_Name= name; 00064 } 00065 00066 00067 GLC_Object& GLC_Object::operator=(const GLC_Object& object) 00068 { 00069 QMutexLocker mutexLocker(&m_Mutex); 00070 m_Uid= object.m_Uid; 00071 m_Name= object.m_Name; 00072 return *this; 00073 } 00074 00075