Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgInit.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file SgInit.h
00003     Initialization of the SmartGo module. */
00004 //----------------------------------------------------------------------------
00005 
00006 #ifndef SG_INIT_H
00007 #define SG_INIT_H
00008 
00009 //----------------------------------------------------------------------------
00010 
00011 /** Used in SgInit(); public only as a side effect of the implementation. */
00012 void SgInitImpl(bool compiledInDebugMode);
00013 
00014 /** Call all lower-level Fini functions.
00015     This function must be called after using the SmartGo module.
00016     Also calls SgMemCheck.
00017     @note Will become obsolete in the future
00018     @see SgInit */
00019 void SgFini();
00020 
00021 /** Call all lower-level initialization functions.
00022     This function must be called before using the SmartGo module.
00023     Returns false if one of them returns false.
00024     @note Don't add any more global variables that need explicit
00025     initialization; this function will become unnecessary in the future.
00026     Currently still needed for:
00027     - Property
00028     @throws SgException on error */
00029 inline void SgInit()
00030 {
00031     // This function must be inline, it needs to use the setting of NDEBUG
00032     // of the user code including this header
00033 #ifndef NDEBUG
00034     SgInitImpl(true);
00035 #else
00036     SgInitImpl(false);
00037 #endif
00038 }
00039 
00040 /** Check that SgInit was called.
00041     @throws SgException if not */
00042 void SgInitCheck();
00043 
00044 //----------------------------------------------------------------------------
00045 
00046 #endif // SG_INIT_H
00047 


Sun Mar 13 2011 Doxygen 1.7.1