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