Last change
on this file since 9304 was
9304,
checked in by bensch, 18 years ago
|
orxonox/trunk: virtual public and an ip class
|
File size:
627 bytes
|
Line | |
---|
1 | |
---|
2 | /*! |
---|
3 | * @file ip.h |
---|
4 | * @brief Definition of Time Class. |
---|
5 | * |
---|
6 | * These are mainly Classes, that are used for wrapping around SDL_thread |
---|
7 | */ |
---|
8 | |
---|
9 | #ifndef __IP_H__ |
---|
10 | #define __IP_H__ |
---|
11 | |
---|
12 | #include <string> |
---|
13 | |
---|
14 | #include "netdefs.h" |
---|
15 | |
---|
16 | |
---|
17 | //! A class to handle time itself |
---|
18 | class IP |
---|
19 | { |
---|
20 | public: |
---|
21 | IP(); |
---|
22 | IP(const std::string& ip); |
---|
23 | IP(int ip); |
---|
24 | |
---|
25 | |
---|
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 | |
---|
41 | }; |
---|
42 | |
---|
43 | #endif /* __IP_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.