aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--SConstruct2
-rw-r--r--src/typeAdapter.cpp39
-rw-r--r--src/typeAdapter.hpp5
3 files changed, 45 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 93b0d23a..052c034f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -82,7 +82,7 @@ libvmime_sources = [
'text.cpp', 'text.hpp',
'textPartFactory.cpp', 'textPartFactory.hpp',
'textPart.hpp',
- 'typeAdapter.hpp',
+ 'typeAdapter.cpp', 'typeAdapter.hpp',
'types.hpp',
'word.cpp', 'word.hpp',
'vmime',
diff --git a/src/typeAdapter.cpp b/src/typeAdapter.cpp
new file mode 100644
index 00000000..58b42a01
--- /dev/null
+++ b/src/typeAdapter.cpp
@@ -0,0 +1,39 @@
+//
+// VMime library (http://vmime.sourceforge.net)
+// Copyright (C) 2002-2004 Vincent Richard <[email protected]>
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+
+
+#include "typeAdapter.hpp"
+
+
+namespace vmime
+{
+
+
+template <>
+void typeAdapter <string>::parse(const string& buffer, const string::size_type position,
+ const string::size_type end, string::size_type* newPosition)
+{
+ m_value = string(buffer.begin() + position, buffer.begin() + end);
+
+ if (newPosition)
+ *newPosition = end;
+}
+
+
+} // vmime
diff --git a/src/typeAdapter.hpp b/src/typeAdapter.hpp
index 1e67ab33..6405b108 100644
--- a/src/typeAdapter.hpp
+++ b/src/typeAdapter.hpp
@@ -113,6 +113,11 @@ private:
};
+template <>
+void typeAdapter <string>::parse(const string& buffer, const string::size_type position,
+ const string::size_type end, string::size_type* newPosition);
+
+
} // vmime