Go to the documentation of this file.
27 m_fin(fin), m_pos(0xFFFFFFFF)
29 m_startPos = fin->
tell();
36 void BinaryTree::skipNodes()
56 void BinaryTree::unserialize()
58 if(m_pos != 0xFFFFFFFF)
62 m_fin->
seek(m_startPos);
85 m_fin->
seek(m_startPos);
91 children.push_back(node);
109 if(pos > m_buffer.
size())
123 if(m_pos+1 > m_buffer.
size())
125 uint8 v = m_buffer[m_pos];
133 if(m_pos+2 > m_buffer.
size())
143 if(m_pos+4 > m_buffer.
size())
153 if(m_pos+8 > m_buffer.
size())
166 if(m_pos+len > m_buffer.
size())
169 std::string ret((
char *)&m_buffer[m_pos], len);
209 if(v.size() > 0xFFFF)
242 for(
size_t i=0;i<size;++i) {
245 m_fin->
addU8(data[i]);
uint16_t readULE16(const uchar *addr)
BinaryTreeVec getChildren()
void write(const uint8 *data, size_t size)
void addString(const std::string &v)
void writeULE16(uchar *addr, uint16_t value)
std::string getString(uint16 len=0)
BinaryTree(const FileStreamPtr &fin)
OutputBinaryTree(const FileStreamPtr &finish)
void writeULE32(uchar *addr, uint32_t value)
void addPoint(const Point &point)
void throw_exception(const std::string &what)
Throws a generic exception.
uint64_t readULE64(const uchar *addr)
void addPos(uint16 x, uint16 y, uint8 z)
std::vector< BinaryTreePtr > BinaryTreeVec
void startNode(uint8 node)
uint32_t readULE32(const uchar *addr)