libmoost
/home/mhx/git/github/libmoost/include/moost/scoped_verbose.hpp File Reference
#include <sstream>
#include <iostream>
#include <cassert>
#include "timer.h"
#include "terminal_format.hpp"
#include <boost/shared_ptr.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
Include dependency graph for scoped_verbose.hpp:

Go to the source code of this file.

Classes

class  moost::scoped_verbose
 handles verbose gracefully. It behaves like ostringstream and prints the verbose at the end of the scope. Example. More...
class  moost::scoped_verbose::scoped_bookmark
class  moost::scoped_verbose::recurrurring_bookmark

Namespaces

namespace  moost
 

Creates a unique temporary directory; removed on scope exit.


namespace  std

Defines

#define MOOST_SCOPED_VERBOSE_BOOKMARK_SEP   "__scoped__"
#define MOOST_RECURRING_VERBOSE_BOOKMARK_SEP   "__recurring__"
#define LEVEL_SCOPED_VERBOSE(level, lvl_enum)

Functions

moost::scoped_verbosestd::endl (moost::scoped_verbose &sv)
moost::scoped_verbosestd::flush (moost::scoped_verbose &sv)

Define Documentation

#define LEVEL_SCOPED_VERBOSE (   level,
  lvl_enum 
)
Value:
class level##_scoped_verbose                            \
{                                                       \
public:                                                 \
   level##_scoped_verbose(scoped_verbose& sv)           \
   : m_sv(sv) {}                                        \
                                                        \
   template <typename T>                                \
   level##_scoped_verbose& operator<<(const T& str)     \
   {                                                    \
      m_sv.add(str, lvl_enum);                          \
      return *(this);                                   \
   }                                                    \
                                                        \
private:                                                \
                                                        \
   scoped_verbose& m_sv;                                \
};

Definition at line 534 of file scoped_verbose.hpp.

#define MOOST_RECURRING_VERBOSE_BOOKMARK_SEP   "__recurring__"

Definition at line 42 of file scoped_verbose.hpp.

#define MOOST_SCOPED_VERBOSE_BOOKMARK_SEP   "__scoped__"

Copyright © 2008-2013 Last.fm Limited

This file is part of libmoost.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 41 of file scoped_verbose.hpp.