Hydrogen - Linux Drum Machine
Main Page | Class Hierarchy | Compound List | File List | Compound Members

Object.h

00001 /*
00002  * Hydrogen
00003  * Copyright(c) 2002-2003 by Alex >Comix< Cominu [comix@users.sourceforge.net]
00004  *
00005  * http://hydrogen.sourceforge.net
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program 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 General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  * $Id: Object.h,v 1.6 2003/04/28 15:19:01 comix Exp $
00022  *
00023  */
00024 
00025 #ifndef H2_OBJECT_H
00026 #define H2_OBJECT_H
00027 
00028 
00029 #include <iostream>
00030 #include <string>
00031 using std::string;
00032 
00033 
00034 class Object;
00035 
00036 //----------------------------------------------------------------------------
00040 class Logger {
00041     private:
00042 
00043     public:
00045         Logger();
00046 
00048         ~Logger();
00049 
00051         void log(string logMsg);
00052 
00054         void info(Object *obj, string logMsg);
00055 
00057         void warning(Object *obj, string logMsg);
00058 
00060         void error(Object *obj, string errorMsg);
00061 
00062 };
00063 
00064 
00065 //----------------------------------------------------------------------------
00069 class Object{
00070     private:
00071         static uint nObjects;
00072         Logger logger;
00073     public:
00075         Object();
00076         Object( const Object& obj );
00077 
00079         virtual ~Object();
00080 
00082         virtual string getClassName() = 0;
00083 
00084         static uint getNObjects();
00085 
00086 
00087         void infoLog(string msg);
00088         void warningLog(string msg);
00089         void errorLog(string msg);
00090 };
00091 
00092 
00093 
00094 
00095 
00096 #endif

 
 
Hydrogen (c) 2002..2003 Comix