osgEarth 2.1.1

/home/cube/sources/osgearth/src/osgEarth/Notify

Go to the documentation of this file.
00001 /* -*-c++-*- */
00002 /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
00003  * Copyright 2008-2010 Pelican Mapping
00004  * http://osgearth.org
00005  *
00006  * osgEarth is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU Lesser General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>
00018  */
00019 
00020 #ifndef OSGEARTH_NOTIFY_H
00021 #define OSGEARTH_NOTIFY_H 1
00022 
00023 #include <osgEarth/Export>
00024 #include <osg/Notify>
00025 
00026 namespace osgEarth
00027 {
00031     extern OSGEARTH_EXPORT void setNotifyLevel(osg::NotifySeverity severity);
00032 
00034     extern OSGEARTH_EXPORT osg::NotifySeverity getNotifyLevel();
00035 
00037     extern OSGEARTH_EXPORT bool isNotifyEnabled(osg::NotifySeverity severity);
00038 
00040     extern OSGEARTH_EXPORT bool initNotifyLevel();
00041   
00042     extern OSGEARTH_EXPORT std::ostream& notify(const osg::NotifySeverity severity);
00043 
00044     inline std::ostream& notify(void) { return osgEarth::notify(osg::INFO); }
00045 }
00046 
00047 #define OE_NOTIFY( X,Y ) if(osgEarth::isNotifyEnabled( X )) osgEarth::notify( X ) << Y
00048 #define OE_FATAL OE_NOTIFY(osg::FATAL,"[osgEarth]* ")
00049 #define OE_WARN OE_NOTIFY(osg::WARN,"[osgEarth]* ")
00050 #define OE_NOTICE OE_NOTIFY(osg::NOTICE,"[osgEarth]  ")
00051 #define OE_INFO OE_NOTIFY(osg::INFO,"[osgEarth]  ")
00052 #define OE_DEBUG OE_NOTIFY(osg::DEBUG_INFO,"[osgEarth]  ")
00053 #define OE_NULL if(false) osgEarth::notify(osg::ALWAYS)
00054 
00055 #endif // OSGEARTH_NOTIFY_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines