source:
orxonox.OLD/branches/proxy/src/lib/util/ip.h
@
9304
Last change on this file since 9304 was 9304, checked in by bensch, 19 years ago | |
---|---|
File size: 627 bytes |
Rev | Line | |
---|---|---|
[7899] | 1 | |
2 | /*! | |
[9304] | 3 | * @file ip.h |
[7899] | 4 | * @brief Definition of Time Class. |
5 | * | |
6 | * These are mainly Classes, that are used for wrapping around SDL_thread | |
7 | */ | |
8 | ||
[9304] | 9 | #ifndef __IP_H__ |
10 | #define __IP_H__ | |
[7899] | 11 | |
[9304] | 12 | #include <string> |
13 | ||
14 | #include "netdefs.h" | |
15 | ||
16 | ||
[7899] | 17 | //! A class to handle time itself |
[9304] | 18 | class IP |
[7899] | 19 | { |
[9304] | 20 | public: |
21 | IP(); | |
22 | IP(const std::string& ip); | |
23 | IP(int ip); | |
[7899] | 24 | |
25 | ||
[9304] | 26 | float ip() const; |
27 | float ip(unsigned int part) const; | |
28 | ||
29 | std::string& ipString() const; | |
30 | ||
31 | ||
32 | ||
33 | public: | |
34 | static int stringToIP(const std::string& ip); | |
35 | static const std::string& ipToString(int ip); | |
36 | ||
37 | private: | |
38 | int _ip; //!< the IP in int form. | |
39 | ||
40 | ||
[7899] | 41 | }; |
42 | ||
[9304] | 43 | #endif /* __IP_H__ */ |
Note: See TracBrowser
for help on using the repository browser.