X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FDeserializer.hh;fp=src%2Fdeserializer.hh;h=8a771e86594db802ec04761090ebb6165517bca1;hp=f2b0bccc06d1ade59f920f120cbf42d3a262148c;hb=c2321281bf12a7efaedde930422c7ddbc92080d4;hpb=87bc17e55b0c1dc73ecc66df856d3f08fd7a7724 diff --git a/src/deserializer.hh b/src/Moof/Deserializer.hh similarity index 86% rename from src/deserializer.hh rename to src/Moof/Deserializer.hh index f2b0bcc..8a771e8 100644 --- a/src/deserializer.hh +++ b/src/Moof/Deserializer.hh @@ -26,11 +26,11 @@ *******************************************************************************/ -#ifndef _DESERIALIZER_HH_ -#define _DESERIALIZER_HH_ +#ifndef _MOOF_DESERIALIZER_HH_ +#define _MOOF_DESERIALIZER_HH_ /** - * @file deserializer.hh + * @file Deserializer.hh * Deserialize structures and types from input on a stream. */ @@ -41,13 +41,13 @@ #include -namespace dc { +namespace Mf { -class serializable; // forward declaration -typedef boost::shared_ptr serializable_ptr; +class Serializable; // forward declaration +typedef boost::shared_ptr SerializablePtr; -class deserializer +class Deserializer { public: @@ -65,9 +65,9 @@ public: * checked. */ - deserializer(const std::string& filePath, bool comments = false, + Deserializer(const std::string& filePath, bool comments = false, bool check = false); - deserializer(std::istream& input, bool comments = false, bool check = false); + Deserializer(std::istream& input, bool comments = false, bool check = false); /** @@ -77,7 +77,7 @@ public: * deserializer. */ - serializable_ptr deserialize(); + SerializablePtr deserialize(); /** * Used by serializable objects to parse themselves. These methods should @@ -95,7 +95,7 @@ public: * method to return the next object as expected. */ - serializable* pullNext(); + Serializable* pullNext(); /** * If the object returned by pullNext() has been received successfully and @@ -110,22 +110,22 @@ public: * This exception is thrown upon deserialization errors. */ - struct exception : std::runtime_error + struct Exception : std::runtime_error { - explicit exception(const std::string& what_arg) : + explicit Exception(const std::string& what_arg) : std::runtime_error(what_arg) {} }; private: - class deserializer_impl; - boost::shared_ptr impl; + class DeserializerImpl; + boost::shared_ptr impl_; }; -} // namespace dc +} // namespace Mf -#endif // _DESERIALIZER_HH_ +#endif // _MOOF_DESERIALIZER_HH_ /** vim: set ts=4 sw=4 tw=80: *************************************************/