relObject.h

Go to the documentation of this file.
00001 /*
00002  * CrocoPat is a tool for relational programming.
00003  * This file is part of CrocoPat. 
00004  *
00005  * Copyright (C) 2002-2008  Dirk Beyer
00006  *
00007  * CrocoPat is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public License
00009  * as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * CrocoPat 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 GNU
00015  * 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 CrocoPat; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * Please find the GNU Lesser General Public License in file
00022  * License_LGPL.txt or at http://www.gnu.org/licenses/lgpl.txt
00023  *
00024  * Author:
00025  * Dirk Beyer (firstname.lastname@sfu.ca)
00026  * Simon Fraser University
00027  *
00028  * With contributions of: Andreas Noack, Michael Vogel
00029  */
00030 
00031 #ifndef _relObject_h
00032 #define _relObject_h
00033 
00034 #include <iostream>
00035 using namespace std;
00036 
00040 class relObject
00041 {
00042   // Static Methods.
00043 public:
00044   // Accessor methods.
00045   static const int GetCount()
00046   {
00047     return(count);
00048   }
00049 
00050 private:
00052   static long count;
00053 
00056   void operator,(const relObject&);
00057 
00058 public:
00059   // Constructor and destructor.
00060   relObject()
00061   {
00062         // We count the number of relObjects.
00063     ++count;
00064   }
00065   
00069   relObject(const relObject& pObj)
00070   {
00071         // We count the number of relObjects.
00072     ++count;
00073   }
00074   
00077   virtual ~relObject()
00078   {
00079     --count;
00080   }
00081 };
00082 
00083 ostream& operator << (ostream& out, const relObject* obj);
00084 
00085 #endif

Generated on Fri Jun 6 22:21:09 2008 for CrocoPat by  doxygen 1.5.1