Loading...
Searching...
No Matches
OperationReport.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralin/vp/OperationReport.h
22
23 \brief Class used as a report logger for Operations.
24*/
25
26#ifndef __TERRALIB_VP_INTERNAL_OPERATIONREPORT_H
27#define __TERRALIB_VP_INTERNAL_OPERATIONREPORT_H
28
29#include "Config.h"
30
31// STL
32#include <cstdio>
33#include <ctime>
34#include <map>
35#include <string>
36#include <sstream>
37
38namespace te
39{
40 namespace vp
41 {
42 /*!
43 \class OperationReport
44
45 \brief Class used as a report logger for Operations.
46 */
48 {
49 public:
50
51 /*! \brief Default constructor. */
53
54 /*! \brief Virtual destructor. */
56
57 public:
58
59 void addTitle(const std::string& message);
60
61 void addSubTitle(const std::string& message);
62
63 void addMessage(const std::string& message, const std::string& severity = "", bool appendTime = false);
64
65 void addStartMessage(const std::string& message, int id);
66
67 void addEndMessage(const std::string& message, int id);
68
69 void addKeyValueMessage(const std::string& key, const std::string& value);
70
72
73 void toFile(const std::string& reportPath);
74
75 std::string toString();
76
77
78 protected:
79
80 std::stringstream m_reportStr;
81
82 std::map<int, std::clock_t> m_clockTime;
83 };
84 }
85}
86
87#endif // __TERRALIB_VP_INTERNAL_OPERATIONREPORT_H
Class used as a report logger for Operations.
std::stringstream m_reportStr
OperationReport()
Default constructor.
void addKeyValueMessage(const std::string &key, const std::string &value)
void addEndMessage(const std::string &message, int id)
void addSubTitle(const std::string &message)
void addStartMessage(const std::string &message, int id)
~OperationReport()
Virtual destructor.
std::map< int, std::clock_t > m_clockTime
std::string toString()
void toFile(const std::string &reportPath)
void addTitle(const std::string &message)
void addMessage(const std::string &message, const std::string &severity="", bool appendTime=false)
TerraLib.
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
Proxy configuration file for TerraView (see terraview_config.h).