*******************************************************************************/
-#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.
*/
#include <boost/shared_ptr.hpp>
-namespace dc {
+namespace Mf {
-class serializable; // forward declaration
-typedef boost::shared_ptr<serializable> serializable_ptr;
+class Serializable; // forward declaration
+typedef boost::shared_ptr<Serializable> SerializablePtr;
-class deserializer
+class Deserializer
{
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);
/**
* deserializer.
*/
- serializable_ptr deserialize();
+ SerializablePtr deserialize();
/**
* Used by serializable objects to parse themselves. These methods should
* method to return the next object as expected.
*/
- serializable* pullNext();
+ Serializable* pullNext();
/**
* If the object returned by pullNext() has been received successfully and
* 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<deserializer_impl> impl;
+ class DeserializerImpl;
+ boost::shared_ptr<DeserializerImpl> impl_;
};
-} // namespace dc
+} // namespace Mf
-#endif // _DESERIALIZER_HH_
+#endif // _MOOF_DESERIALIZER_HH_
/** vim: set ts=4 sw=4 tw=80: *************************************************/