Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __LIBVISIO_UTILS_H__
00032 #define __LIBVISIO_UTILS_H__
00033
00034 #include <stdio.h>
00035 #include "VSDTypes.h"
00036
00037 #ifdef _MSC_VER
00038
00039 typedef unsigned char uint8_t;
00040 typedef unsigned short uint16_t;
00041 typedef short int16_t;
00042 typedef unsigned uint32_t;
00043 typedef int int32_t;
00044 typedef unsigned __int64 uint64_t;
00045
00046 #else
00047
00048 #ifdef HAVE_CONFIG_H
00049
00050 #include <config.h>
00051
00052 #ifdef HAVE_STDINT_H
00053 #include <stdint.h>
00054 #endif
00055
00056 #ifdef HAVE_INTTYPES_H
00057 #include <inttypes.h>
00058 #endif
00059
00060 #else
00061
00062 #include <stdint.h>
00063 #include <inttypes.h>
00064
00065 #endif
00066
00067 #endif
00068
00069 #include <libwpd/libwpd.h>
00070 #include <libwpd-stream/libwpd-stream.h>
00071
00072
00073
00074
00075
00076 #ifdef DEBUG
00077 #ifdef VERBOSE_DEBUG
00078 #define VSD_DEBUG_MSG(M) printf("%15s:%5d: ", __FILE__, __LINE__); printf M
00079 #define VSD_DEBUG(M) M
00080 #else
00081 #define VSD_DEBUG_MSG(M) printf M
00082 #define VSD_DEBUG(M) M
00083 #endif
00084 #else
00085 #define VSD_DEBUG_MSG(M)
00086 #define VSD_DEBUG(M)
00087 #endif
00088
00089 namespace libvisio
00090 {
00091
00092 uint8_t readU8(WPXInputStream *input);
00093 uint16_t readU16(WPXInputStream *input);
00094 int16_t readS16(WPXInputStream *input);
00095 uint32_t readU32(WPXInputStream *input);
00096 int32_t readS32(WPXInputStream *input);
00097 uint64_t readU64(WPXInputStream *input);
00098
00099 double readDouble(WPXInputStream *input);
00100
00101 void appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, size_t base64StringLength);
00102
00103 const ::WPXString getColourString(const Colour &c);
00104
00105 class EndOfStreamException
00106 {
00107 };
00108
00109 class XmlParserException
00110 {
00111 };
00112
00113 class GenericException
00114 {
00115 };
00116
00117 }
00118
00119 #endif // __LIBVISIO_UTILS_H__
00120