#include <text.hpp>
Public Member Functions | |
| chunk (const chunk &other) | |
| chunk (const string_type &string, const user *author) | |
| chunk (const net6::packet &pack, unsigned int &index, const user_table &table) | |
| Reads a chunk from a net6::packet. | |
| chunk (const serialise::object &obj, const user_table &table) | |
| Reads a chunk from a serialisation object. | |
| void | serialise (serialise::object &obj) const |
| Serialises the chunk to the given serialisation object. | |
| void | append_packet (net6::packet &pack) const |
| Reads the chunk from a net6::packet. | |
| void | prepend (const string_type &text) |
| Prepends text to the chunk. | |
| void | append (const string_type &text) |
| Appends text to the chunk. | |
| void | insert (size_type pos, const string_type &text) |
| Inserts text into the chunk. | |
| void | erase (size_type pos, size_type len=npos) |
| Erases text from the chunk. | |
| const string_type & | get_text () const |
| Returns the chunk's text. | |
| size_type | get_length () const |
| Returns the length of this chunk. | |
| const user * | get_author () const |
| Returns the user that has written this chunk. | |
Protected Attributes | |
| string_type | m_text |
| const user * | m_author |
Definition at line 67 of file text.hpp.
| obby::text::chunk::chunk | ( | const string_type & | string, | |
| const user * | author | |||
| ) |
| obby::text::chunk::chunk | ( | const net6::packet & | pack, | |
| unsigned int & | index, | |||
| const user_table & | table | |||
| ) |
| obby::text::chunk::chunk | ( | const serialise::object & | obj, | |
| const user_table & | table | |||
| ) |
| void obby::text::chunk::serialise | ( | serialise::object & | obj | ) | const |
Serialises the chunk to the given serialisation object.
Definition at line 89 of file text.cpp.
References obby::serialise::object::add_attribute(), m_author, and m_text.
| void obby::text::chunk::append_packet | ( | net6::packet & | pack | ) | const |
| void obby::text::chunk::prepend | ( | const string_type & | text | ) |
Prepends text to the chunk.
Definition at line 100 of file text.cpp.
References m_text.
Referenced by obby::text::erase_chunk(), obby::text::insert_chunk(), obby::text::prepend(), and obby::text::set_max_chunk_size().
| void obby::text::chunk::append | ( | const string_type & | text | ) |
Appends text to the chunk.
Definition at line 105 of file text.cpp.
References m_text.
Referenced by obby::text::append(), obby::text::erase_chunk(), obby::text::insert_chunk(), and obby::text::substr().
| void obby::text::chunk::insert | ( | size_type | pos, | |
| const string_type & | text | |||
| ) |
Inserts text into the chunk.
Definition at line 110 of file text.cpp.
References m_text.
Referenced by obby::text::insert_chunk().
Erases text from the chunk.
Definition at line 115 of file text.cpp.
References m_text.
Referenced by obby::text::erase_chunk(), and obby::text::insert_chunk().
| const obby::text::string_type & obby::text::chunk::get_text | ( | ) | const |
Returns the chunk's text.
Definition at line 120 of file text.cpp.
References m_text.
Referenced by obby::text::erase_chunk(), obby::text::insert_chunk(), obby::text::set_max_chunk_size(), and obby::text::substr().
| obby::text::size_type obby::text::chunk::get_length | ( | ) | const |
Returns the length of this chunk.
Equivalent to get_text().length()
Definition at line 130 of file text.cpp.
References m_text.
Referenced by obby::text::append(), obby::text::erase_chunk(), obby::text::insert_chunk(), obby::text::prepend(), obby::text::set_max_chunk_size(), and obby::text::substr().
| const obby::user * obby::text::chunk::get_author | ( | ) | const |
Returns the user that has written this chunk.
Definition at line 125 of file text.cpp.
References m_author.
Referenced by obby::text::append(), obby::text::erase_chunk(), obby::text::insert_chunk(), obby::text::prepend(), obby::text::set_max_chunk_size(), and obby::text::substr().
string_type obby::text::chunk::m_text [protected] |
Definition at line 128 of file text.hpp.
Referenced by append(), append_packet(), erase(), get_length(), get_text(), insert(), prepend(), and serialise().
const user* obby::text::chunk::m_author [protected] |
Definition at line 129 of file text.hpp.
Referenced by append_packet(), get_author(), and serialise().
1.5.1