1// Aseprite Document Library
2// Copyright (c) 2001-2015 David Capello
3//
4// This file is released under the terms of the MIT license.
5// Read LICENSE.txt for more information.
6
7#ifndef DOC_LAYER_IO_H_INCLUDED
8#define DOC_LAYER_IO_H_INCLUDED
9#pragma once
10
11#include "base/exception.h"
12
13#include <iosfwd>
14
15namespace doc {
16 class Layer;
17 class SubObjectsFromSprite;
18
19 // Thrown when a invalid layer type is read from the istream.
20 class InvalidLayerType : public base::Exception {
21 public:
22 InvalidLayerType(const char* msg) throw() : base::Exception(msg) { }
23 };
24
25 void write_layer(std::ostream& os, const Layer* layer);
26 Layer* read_layer(std::istream& is, SubObjectsFromSprite* subObjects);
27
28} // namespace doc
29
30#endif
31