|
Last change
on this file since 8931ef was a80f419, checked in by Frederik Heber <heber@…>, 15 years ago |
|
First version.
Everything was extracted from project MoleCuilder and adapted such that it
runs on its own (i.e. new configure.ac, Makefile.am structure, stuff for
libtool versioning, ...)
|
-
Property mode
set to
100644
|
|
File size:
1.0 KB
|
| Rev | Line | |
|---|
| [a80f419] | 1 | /*
|
|---|
| 2 | * Project: MoleCuilder
|
|---|
| 3 | * Description: creates and alters molecular systems
|
|---|
| 4 | * Copyright (C) 2010 University of Bonn. All rights reserved.
|
|---|
| 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | /*
|
|---|
| 9 | * Info.cpp
|
|---|
| 10 | *
|
|---|
| 11 | * Created on: Nov 25, 2009
|
|---|
| 12 | * Author: heber
|
|---|
| 13 | */
|
|---|
| 14 |
|
|---|
| 15 | // include config.h
|
|---|
| 16 | #ifdef HAVE_CONFIG_H
|
|---|
| 17 | #include <config.h>
|
|---|
| 18 | #endif
|
|---|
| 19 |
|
|---|
| 20 | #include "MemDebug.hpp"
|
|---|
| 21 |
|
|---|
| 22 | #include "Info.hpp"
|
|---|
| 23 | #include "Log.hpp"
|
|---|
| 24 | #include "Verbose.hpp"
|
|---|
| 25 |
|
|---|
| 26 | int Info::verbosity = 0;
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | * Constructor. Do not use this function. Use getInstance() instead.
|
|---|
| 30 | *
|
|---|
| 31 | * \return Info instance
|
|---|
| 32 | */
|
|---|
| 33 | Info::Info(const char *msg) :
|
|---|
| 34 | FunctionName(msg)
|
|---|
| 35 | {
|
|---|
| 36 | verbosity++;
|
|---|
| 37 | DoLog(0) && (Log() << Verbose(0) << "Begin of " << FunctionName << endl);
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | /**
|
|---|
| 41 | * Destructor. Better use purgeInstance().
|
|---|
| 42 | */
|
|---|
| 43 | Info::~Info() {
|
|---|
| 44 | DoLog(0) && (Log() << Verbose(0) << "End of " << FunctionName << endl);
|
|---|
| 45 | verbosity--;
|
|---|
| 46 | }
|
|---|
| 47 |
|
|---|
| 48 | /**
|
|---|
| 49 | * Sets the verbosity.
|
|---|
| 50 | *
|
|---|
| 51 | * \param verbosityLevel verbosity
|
|---|
| 52 | */
|
|---|
| 53 | void Info::setVerbosity(int verbosityLevel) {
|
|---|
| 54 | verbosity = verbosityLevel;
|
|---|
| 55 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.