gnDebug.h Source File

Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# gnDebug.h

Go to the documentation of this file.

    00001
    00002 // File:            gn/gnDebug.h
    00003 // Purpose:         Debug header used for libGenome
    00004 // Description:     Debug defines all debuging tools used for libGenome
    00005 // Rev:             A
    00006 // Author:          Aaron Darling
    00007 // Last Edited:     April 15, 2001, 10:34:50pm
    00008 // Modified by:
    00009 // Copyright:       (c) Aaron Darling
    00010 // Licenses:        Proprietary
    00012
    00013 #ifndef _gnDebug_h_
    00014 #define _gnDebug_h_
    00015
    00016 #ifdef GN_GUI
    00017 // For compilers that support precompilation, includes "wx/wx.h".
    00018 #include "wx/wxprec.h"
    00019 #ifdef __BORLANDC__
    00020     #pragma hdrstop
    00021 #endif
    00022
    00023 // for all others, include the necessary headers (this file is usually all you
    00024 // need because it includes almost all "standard" wxWindows headers)
    00025 #ifndef WX_PRECOMP
    00026     #include "wx/wx.h"
    00027 #endif
    00028 #endif //GN_GUI
    00029
    00030 #include "gn/gnDefs.h"
    00031 #include <string>
    00032 #include <iostream>
    00033
    00034 #ifdef COMMAND_LINE
    00035
    00036 const boolean USE_COMMAND_LINE = true;
    00037 const boolean USE_GUI = false;
    00038
    00039 #elif defined(GN_GUI)
    00040
    00041 const boolean USE_COMMAND_LINE = false;
    00042 const boolean USE_GUI = true;
    00043
    00044 #else
    00045
    00046 const boolean USE_COMMAND_LINE = false;
    00047 const boolean USE_GUI = false;
    00048
    00049 #endif
    00050 GNDLLEXPORT void DebugMsg(string a);
    00051 inline
    00052 void DebugMsg(string a){
    00053         if(USE_COMMAND_LINE){
    00054                 cout << a;
    00055         }else if(USE_GUI){
    00056 #ifdef GN_GUI
    00057                 wxString debugstring = a.c_str();
    00058                 wxMessageDialog wxmd2(NULL, debugstring, "Debug Message", wxOK | wxCENTRE | wxICON_INFORMATION);
    00059                 wxmd2.ShowModal();
    00060 #endif
    00061         }
    00062 }
    00063
    00064 GNDLLEXPORT void ErrorMsg(string a);
    00065 inline
    00066 void ErrorMsg(string a){
    00067         if(USE_COMMAND_LINE){
    00068                 cout << a;
    00069         }else if(USE_GUI){
    00070 #ifdef GN_GUI
    00071                 wxString errorstring = a.c_str();
    00072                 wxMessageDialog wxmd2(NULL, errorstring, "Error Message", wxOK | wxCENTRE | wxICON_HAND);
    00073                 wxmd2.ShowModal();
    00074 #endif
    00075         }
    00076 }
    00077
    00078 #endif
    00079         //_gnDebug_h_