FBB::Msg

FBB::Msg

libbobcat1-dev_2.02.03-x.tar.gz

2005-2009


FBB::Msg(3bobcat)

FBB::Msg(3bobcat)

libbobcat1-dev_2.02.03-x.tar.gz Message handler

2005-2009

NAME

FBB::Msg - Generic message handler

SYNOPSIS

#include <bobcat/msg>
Linking option: -lbobcat

DESCRIPTION

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

CONSTRUCTORS

The class Msg only has static members. There are no constructors.

MEMBER FUNCTIONS

The class Msg only has static members. The member functions listed below are not frequently used. They exist primarily to control the output streams and to fine-tune the inner workings of the class' data members. Instead, the class-less members msg() and lineMsg() (see below) and the manipulators (see below) are used to create messages.

FREE FUNCTIONS

Note that the following two functions are not members of the class Msg, but are defined in the namespace FBB.

MANIPULATORS

The following manipulators (which are not part of the FBB::Msg, class, but are defined in the FBB namespace) can be inserted into the FBB::Msg object. All messages are by default inserted into the standard output stream (cout).

OVERLOADED OPERATOR

The following insertion operator is not defined in the namespace FBB. It is part of the distribution to allow the manipulators to be inserted into a ostrstream:

EXAMPLE


    #include <bobcat/msg>

    using namespace FBB;

    int main(int argc)
    try
    {
        if (argc == 1)
            msg() << "Need some arguments" << fatal;
        else
        {
            Msg::setDisplay(true);
            msg() << "Thanks for providing " << argc << 
                                    " arguments " << info;
        }
    }            
    catch(...)
    {
        msg() << "Got an Errno object, but ignoring it" << err;
    }
        

FILES

bobcat/msg - defines the class interface

SEE ALSO

bobcat(7), errno(3bobcat), indent(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).