Infinispan HotRod C++ Client 9.2.0.Final
Loading...
Searching...
No Matches
ServerConfiguration.h
Go to the documentation of this file.
1/*
2 * ServerConfiguration.h
3 *
4 * Created on: Jul 10, 2013
5 * Author: samuele
6 */
7
8#ifndef SERVERCONFIGURATION_H_
9#define SERVERCONFIGURATION_H_
10
11#include <string>
14
15namespace infinispan {
16namespace hotrod {
17
24{
25public:
26 ServerConfiguration(): host(""), port(0) {} // for use just in collections
27 ServerConfiguration(const std::string &_host, int _port): host(_host), port(_port) {}
28
29 const std::string &getHost() const
30 {
31 return host;
32 }
38 const char *getHostCString() const
39 {
40 return host.data();
41 }
42
48 const int& getPort() const
49 {
50 return port;
51 }
52
53private:
54 std::string host;
55 __pragma(warning(suppress:4251))
56 int port;
57
58 static void deleteString(std::string *str) { delete str; }
59};
60
61}
62}
63#endif /* SERVERCONFIGURATION_H_ */
#define HR_EXTERN
Definition: ImportExport.h:35
Definition: ServerConfiguration.h:24
ServerConfiguration()
Definition: ServerConfiguration.h:26
const int & getPort() const
Definition: ServerConfiguration.h:48
const std::string & getHost() const
Definition: ServerConfiguration.h:29
const char * getHostCString() const
Definition: ServerConfiguration.h:38
ServerConfiguration(const std::string &_host, int _port)
Definition: ServerConfiguration.h:27
#define __pragma(...)
Definition: defs.h:106
Definition: AuthenticationConfiguration.h:10