.TH "FBB::level" "3bobcat" "2005\-2020" "libbobcat\-dev_5\&.07\&.00" "Log\-manipulator" .PP .SH "NAME" FBB::level \- Manipulator setting the log\-level of \fBFBB::Log\fP objects .PP .SH "SYNOPSIS" \fB#include \fP .br Linking option: \fI\-lbobcat\fP .PP .SH "DESCRIPTION" An \fBFBB::level\fP object is used to specify insertion `forces\(cq\& of information that is inserted into \fBFBB::Log\fP objects\&. When inserted into \fILog\fP objects it defines the `force\(cq\& of subsequent insertions (or \fIwrite\fP calls) into those \fILog\fP objects\&. .PP Conversely, \fILog\fP objects may specify insertion `resistances\(cq\& through their \fIsetLevel\fP members\&. If the \fIlevel\(cq\&s\fP `force\(cq\& is equal to or exceeds the \fILog\fP object\(cq\&s `resistance\(cq\& then the insertion is performed, otherwise the insertion is ignored\&. A single insertion statement may contain multiple \fIlevel\fP calls\&. If so, then each \fIlevel\fP call updates the `force\(cq\& of insertions following the \fIlevel\fP call\&. .PP By default insertions into \fILog\fP objects not preceded by \fIlevel\fP insertions are completed\&. .PP When a \fIlevel\fP object is inserted into another kind of \fIstd::ostream\fP object the \fIlevel\fP object performs no actions\&. .PP .SH "NAMESPACE" \fBFBB\fP .br All constructors, members, operators and manipulators, mentioned in this man\-page, are defined in the namespace \fBFBB\fP\&. .PP .SH "INHERITS FROM" \- .PP .SH "CONSTRUCTORS" .IP o \fBlevel(size_t force)\fP: .br This constructor is used in insertion statements, usually inserting it as anonymous object into an \fIFBB::Log\fP object\&. .PP Copy and move constructors (and assignment operators) are available\&. .PP .SH "OVERLOADED OPERATOR" .IP o \fBstd::ostream &::operator<<(std::ostream &ostr, FBB::level const &force)\fP: .br If the \fIostr\fP can be downcasted to an \fIFBB::Log\fP object then subsequent insertions are performed if \fIforce\fP exceeds the \fILog\fP object\(cq\&s `resistance\(cq\& as specified by its \fIsetLevel\fP member\&. If \fIostr\fP does not actually refer to a \fILog\fP object then \fIostr\fP is returned without any further action, and \fIostr\fP handles subsequent insertions in its default way\&. .PP .SH "EXAMPLE" .nf #include #include #include #include using namespace std; using namespace FBB; int main() { // Log &log = Log::initialize(\(dq\&&1\(dq\&); // uses the static Log object Log log; // explicitly defining a Log object log\&.open(\(dq\&/tmp/out\(dq\&); // or at once: Log log{ \(dq\&/tmp/out\(dq\& } log << \(dq\&This message is written to cout\(dq\& << nl << setw(16) << \(cq\& \(cq\& << \(dq\&occupying multiple lines\en\(dq\&; log\&.off(); log << \(dq\&This message is not shown\en\(dq\&; log << \(dq\&This message is not shown\en\(dq\&; log << fnl; log << \(dq\&This message is not shown\en\(dq\&; log\&.on(2); log << \(dq\&This message is shown\en\(dq\&; log << level(0) << \(dq\¬ shown\(dq\& << level(2) << \(dq\&shown at level 2\en\(dq\&; log << level(3) << \(dq\&at level(3)\(dq\& << level(1) << \(dq\¬ shown\(dq\& << fnl; log << \(dq\&separate new line\en\(dq\&; log << level(2) << \(dq\&in business again\en\(dq\&; log << \(dq\&final line\en\(dq\&; } .fi .PP .SH "FILES" \fIbobcat/level\fP \- defines the class interface\&. .PP .SH "SEE ALSO" \fBbobcat\fP(7), \fBlog\fP(3bobcat) .PP .SH "BUGS" None Reported\&. .PP .SH "BOBCAT PROJECT FILES" .PP .IP o \fIhttps://fbb\-git\&.gitlab\&.io/bobcat/\fP: gitlab project page; .IP o \fIbobcat_5\&.07\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_5\&.07\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_5\&.07\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries; .IP o \fIlibbobcat1\-dev_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries, headers and manual pages; .PP .SH "BOBCAT" Bobcat is an acronym of `Brokken\(cq\&s Own Base Classes And Templates\(cq\&\&. .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the GNU General Public License (GPL)\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&. .PP