Put the readers and writers in charles namespace

This commit is contained in:
Eryn Wells 2014-08-09 20:46:14 -07:00
parent 84cb27fa6f
commit 3a8c955796
4 changed files with 29 additions and 20 deletions

View file

@ -2,18 +2,18 @@
* vim: set tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
#ifndef __READERYAML_HH__
#define __READERYAML_HH__
#include "reader.hh"
#include "scene.hh"
namespace charles {
/**
* An input file reader for YAML files.
*/
#ifndef __READER_YAML_HH__
#define __READER_YAML_HH__
#include "reader.hh"
#include "scene.h"
struct YAMLReader
: public Reader
{
@ -21,9 +21,9 @@ struct YAMLReader
: Reader(scene)
{ }
~YAMLReader() { }
ssize_t read_file(const std::string& filename);
};
} /* namespace charles */
#endif /* __READER_YAML_HH__ */

View file

@ -1,4 +1,4 @@
/* scene.h
/* scene.hh
* vim: tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
@ -17,11 +17,11 @@
#include "basics/basics.hh"
namespace charles {
class Writer;
namespace charles {
/**
* Scenes are the top level object in charles. Scenes contain objects, lights, a
* camera, etc. and can be rendered to pixel data and written to a file.

View file

@ -11,7 +11,9 @@
#include <string>
class Scene;
namespace charles {
struct Scene;
class Writer
@ -24,4 +26,6 @@ public:
virtual int write_scene(const Scene &scene, const std::string &filename) = 0;
};
} /* namespace charles */
#endif

View file

@ -1,16 +1,19 @@
/* writer_png.h
*
* Declaration of the PNG writer.
*
* vim: set tw=80:
* Eryn Wells <eryn@erynwells.me>
*/
#ifndef __WRITER_PNG_H__
#define __WRITER_PNG_H__
#ifndef __WRITERPNG_HH__
#define __WRITERPNG_HH__
#include "writer.h"
namespace charles {
/**
* Write for producing PNG files.
*/
class PNGWriter
: public Writer
{
@ -18,4 +21,6 @@ public:
int write_scene(const Scene &scene, const std::string &filename);
};
} /* namespace charles */
#endif