source: observatorio/simulacion/SimEscenariosEconomicos/dbProperties.H

simulacion
Last change on this file was 7941763, checked in by Alejandro <amujica@…>, 10 years ago

eliminacion de un filtro redundante

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2  Copyright (C) 2012
3  Alejandro Mujica (amujica@cenditel.gob.ve)
4  Erwin Paredes (eparedes@cenditel.gob.ve)
5  José Ruiz (jruiz@cenditel.gob.ve)
6  Rodolfo Rangel (rrangel@cenditel.gob.ve)
7  Julie Vera (jvera@cenditel.gob.ve)
8 
9  CENDITEL Fundación Centro Nacional de Desarrollo e Investigación en
10  Tecnologías Libres
11 
12  Este programa es software libre; Usted puede usarlo bajo los términos de la
13  licencia de software GPL versión 2.0 de la Free Software Foundation.
14 
15  Este programa se distribuye con la esperanza de que sea útil, pero SIN
16  NINGUNA GARANTÍA; tampoco las implícitas garantías de MERCANTILIDAD o
17  ADECUACIÓN A UN PROPÓSITO PARTICULAR.
18  Consulte la licencia GPL para más detalles. Usted debe recibir una copia
19  de la GPL junto con este programa; si no, escriba a la Free Software
20  Foundation Inc. 51 Franklin Street,5 Piso, Boston, MA 02110-1301, USA.
21*/
22
23/*
24  Autor:             Alejandro J. Mujica
25  Fecha de creación: 25/07/2013
26  Este archivo contiene la definición de la clase DBProperties.
27*/
28
29# ifndef DB_PROPERTIES_H
30# define DB_PROPERTIES_H
31
32# include <string>
33# include <memory>
34
35class DBProperties {
36
37    std::string host;
38
39    std::string port;
40
41    std::string user;
42
43    std::string pass;
44
45    std::string dbname;
46
47    static std::unique_ptr <DBProperties> instance;
48
49    DBProperties();
50
51public:
52    static DBProperties & getInstance();
53
54    const std::string & getHost() const;
55
56    void setHost(const std::string &);
57
58    void setHost(std::string &&);
59
60    const std::string & getPort() const;
61
62    void setPort(const std::string &);
63
64    void setPort(std::string &&);
65
66    const std::string & getUser() const;
67
68    void setUser(const std::string &);
69
70    void setUser(std::string &&);
71
72    const std::string & getPassword() const;
73
74    void setPassword(const std::string &);
75
76    void setPassword(std::string &&);
77
78    const std::string & getDbname() const;
79
80    void setDbname(const std::string &);
81
82    void setDbname(std::string &&);
83
84    std::string getConnectionInfo();
85
86    void readFile(const std::string &);
87};
88
89# endif // DB_PROPERTIES_H
90
Note: See TracBrowser for help on using the repository browser.