diff options
Diffstat (limited to 'cutl/xml/serializer.cxx')
-rw-r--r-- | cutl/xml/serializer.cxx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/cutl/xml/serializer.cxx b/cutl/xml/serializer.cxx index 3919635..8da3df5 100644 --- a/cutl/xml/serializer.cxx +++ b/cutl/xml/serializer.cxx @@ -22,14 +22,27 @@ namespace cutl serialization (const string& n, const string& d) : name_ (n), description_ (d) { - if (!n.empty ()) + init (); + } + + serialization:: + serialization (const serializer& s, const std::string& d) + : name_ (s.output_name ()), description_ (d) + { + init (); + } + + void serialization:: + init () + { + if (!name_.empty ()) { - what_ += n; + what_ += name_; what_ += ": "; } what_ += "error: "; - what_ += d; + what_ += description_; } char const* serialization:: |