summaryrefslogtreecommitdiff
path: root/i/simulotron/src/gs/gs_message.cc
diff options
context:
space:
mode:
Diffstat (limited to 'i/simulotron/src/gs/gs_message.cc')
-rw-r--r--i/simulotron/src/gs/gs_message.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/i/simulotron/src/gs/gs_message.cc b/i/simulotron/src/gs/gs_message.cc
index 34a4368..c0e099a 100644
--- a/i/simulotron/src/gs/gs_message.cc
+++ b/i/simulotron/src/gs/gs_message.cc
@@ -56,6 +56,13 @@ GSMessage::readGS(void * data, size_t size)
}
void
+GSMessage::getString(std::string & str, size_t size)
+{
+ str.assign(igs_, igs_ + size);
+ igs_ += size;
+}
+
+void
GSMessage::appendGS (const void * data, size_t size)
{
gs_.append(static_cast<const char *> (data), size);
@@ -81,3 +88,10 @@ GSMessage::clear(void)
gs_.clear();
setIteratorBegin();
}
+
+void
+GSMessage::delBeforeIt(void)
+{
+ gs_.erase(gs_.begin(), igs_ - 1);
+ setIteratorBegin();
+}