All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PrintManager.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 PrintManager.h
22 
23  \brief Informations printing manager
24  */
25 
26 #ifndef __TERRALIB_TOOLS_DSINFO_PRINTMANAGER_H
27 #define __TERRALIB_TOOLS_DSINFO_PRINTMANAGER_H
28 
29 // DSInfo
30 #include <DSInfo.h>
31 
32 // STL
33 #include <iostream>
34 #include <vector>
35 
36 /*!
37  \class PrintManager
38 
39  \brief Class with methods to print the Data SOurce information
40 */
42 {
43 
44  public:
45 
46  /*!
47  \brief Init
48 
49  \param dstype Data Source Type
50  \param connstr Data Source Connection String
51 
52  \return True if successfully
53  */
54  bool init(std::string dstype,std::string connstr);
55 
56  /*!
57  \brief Print Data Source Parameters
58 
59  \param dstype Data Source Type
60 
61  \return void
62  */
63  void printDataSourceParameters(std::string dsType);
64 
65  /*!
66  \brief Print All Data Source Informations
67 
68  \param pkDetails If want Primary Key Details
69  \param fkDetails If want Foreign Key Details
70  \param ukDetails If want Unique Key Details
71  \param idxDetails If want Index Key Details
72  \param ccDetails If want Check Constraint Details
73 
74  \return void
75  */
76  void printAllInfo(bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails);
77 
78  /*!
79  \brief Print Data Set Name List
80 
81  \return void
82  */
83  void printDataSetNameList();
84 
85  /*!
86  \brief Print Data Set Informations
87 
88  \param dataSetNameList String vector with the passed Data Set Names
89  \param pkDetails If want Primary Key Details
90  \param fkDetails If want Foreign Key Details
91  \param ukDetails If want Unique Key Details
92  \param idxDetails If want Index Key Details
93  \param ccDetails If want Check Constraint Details
94 
95  \return void
96  */
97  void printDataSetInfo(std::vector<std::string> dataSetNameList, bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails);
98 
99  /*!
100  \brief Print Data Set Informations
101 
102  \param dataSetName String with the passed Data Set Name
103  \param pkDetails If want Primary Key Details
104  \param fkDetails If want Foreign Key Details
105  \param ukDetails If want Unique Key Details
106  \param idxDetails If want Index Key Details
107  \param ccDetails If want Check Constraint Details
108 
109  \return void
110  */
111  void printDataSetInfo(std::string dataSetName, bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails);
112 
113  private:
114 
115  /*!
116  \brief Print Data Source Header
117 
118  \return void
119  */
120  void printHeader();
121 
122  /*!
123  \brief Print Data Source Catalog
124 
125  \param pkDetails If want Primary Key Details
126  \param fkDetails If want Foreign Key Details
127  \param ukDetails If want Unique Key Details
128  \param idxDetails If want Index Key Details
129  \param ccDetails If want Check Constraint Details
130 
131  \return void
132  */
133  void printCatalog(bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails);
134 
135  /*!
136  \brief Print Data Source Capabilities
137 
138  \return void
139  */
140  void printCapabilities();
141 
142 
143  /*!
144  \brief Print Primary Key Details
145 
146  \param pk PKInfo struct
147 
148  \return void
149  */
150  void printPKDetails(struct PKInfo pk);
151 
152  /*!
153  \brief Print Foreign Key Details
154 
155  \param fk FKInfo struct
156 
157  \return void
158  */
159  void printFKDetails(struct FKInfo fk);
160 
161  /*!
162  \brief Print Unique Key Details
163 
164  \param uk UKInfo struct
165 
166  \return void
167  */
168  void printUKDetails(struct UKInfo uk);
169 
170  /*!
171  \brief Index Details
172 
173  \param idx IdxInfo struct
174 
175  \return void
176  */
177  void printIdxDetails(struct IdxInfo idx);
178 
179  /*!
180  \brief Print Check Constraint Details
181 
182  \param cc CCInfo struct
183 
184  \return void
185  */
186  void printCCDetails(struct CCInfo cc);
187 
188  private:
189 
190  DSInfo m_dsi; //!< DSInfo object
191 
192 };
193 
194 #endif //__TERRALIB_TOOLS_DSINFO_PRINTMANAGER_H
void printUKDetails(struct UKInfo uk)
Print Unique Key Details.
Struct that stores information about a index using the most common data types.
Definition: DSInfo.h:207
bool init(std::string dstype, std::string connstr)
Init.
Definition: PrintManager.cpp:4
void printCapabilities()
Print Data Source Capabilities.
Struct that stores information about a check constraint using the most common data types...
Definition: DSInfo.h:217
void printHeader()
Print Data Source Header.
void printFKDetails(struct FKInfo fk)
Print Foreign Key Details.
Class with methods to print the Data SOurce information.
Definition: PrintManager.h:41
void printCCDetails(struct CCInfo cc)
Print Check Constraint Details.
Struct that stores information about a primary key using the most common data types.
Definition: DSInfo.h:180
Class with methods to manage the application.
Definition: DSInfo.h:58
void printCatalog(bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails)
Print Data Source Catalog.
void printIdxDetails(struct IdxInfo idx)
Index Details.
void printDataSetInfo(std::vector< std::string > dataSetNameList, bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails)
Print Data Set Informations.
void printPKDetails(struct PKInfo pk)
Print Primary Key Details.
void printDataSetNameList()
Print Data Set Name List.
Struct that stores information about a unique key using the most common data types.
Definition: DSInfo.h:198
void printAllInfo(bool pkDetails, bool fkDetails, bool ukDetails, bool idxDetails, bool ccDetails)
Print All Data Source Informations.
Definition: PrintManager.cpp:9
DSInfo m_dsi
DSInfo object.
Definition: PrintManager.h:190
Struct that stores information about a foreign key using the most common data types.
Definition: DSInfo.h:189
void printDataSourceParameters(std::string dsType)
Print Data Source Parameters.
Data Source Informations tool.