view gen/logger.h @ 506:a6c105aa00d5

Provided overload to TypeClass::builtinTypeInfo to return true. Shouldn't almost all types have a builtin typeinfo? Maybe it'd be better to have the default at true and only overload typedef and friends.
author Christian Kamm <kamm incasoftware de>
date Wed, 13 Aug 2008 22:14:43 +0200
parents 1700239cab2e
children 18ad5601dff7
line wrap: on
line source

#ifndef _llvmd_gen_logger_h_
#define _llvmd_gen_logger_h_

#include <iostream>

struct Loc;

namespace Logger
{
    void indent();
    void undent();
    std::ostream& cout();
    void println(const char* fmt, ...);
    void print(const char* fmt, ...);
    void enable();
    void disable();
    bool enabled();

    void attention(const Loc& loc, const char* fmt, ...);

    struct LoggerScope
    {
        LoggerScope()
        {
            Logger::indent();
        }
        ~LoggerScope()
        {
            Logger::undent();
        }
    };
}

#define LOG_SCOPE    Logger::LoggerScope _logscope;

#endif