28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ |
29 */ |
30 |
30 |
31 #pragma once |
31 #pragma once |
32 #include <stdexcept> |
32 #include <stdexcept> |
|
33 #include <string> |
33 #include "../main.h" |
34 #include "../main.h" |
34 BEGIN_ZFC_NAMESPACE |
35 BEGIN_ZFC_NAMESPACE |
35 |
|
36 class String; |
|
37 |
36 |
38 enum |
37 enum |
39 { |
38 { |
40 MAX_NETWORK_STRING = 0x800 |
39 MAX_NETWORK_STRING = 0x800 |
41 }; |
40 }; |
42 |
41 |
43 class IOError : public std::exception |
42 class IOError : public std::exception |
44 { |
43 { |
45 String m_message; |
44 std::string m_message; |
46 |
45 |
47 public: |
46 public: |
48 IOError(String message) : |
47 IOError(std::string message) : |
49 m_message(message) {} |
48 m_message(message) {} |
50 |
49 |
51 const char* what() const throw() |
50 const char* what() const throw() |
52 { |
51 { |
53 return m_message; |
52 return m_message.data(); |
54 } |
53 } |
55 }; |
54 }; |
56 |
55 |
57 class Bytestream |
56 class Bytestream |
58 { |
57 { |