From 5e20ee3a1dbb84ef20754c7565a999bc5a6686d1 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 18 Mar 2015 15:46:16 +1100 Subject: [PATCH] json/fwd: add forward declaration header --- Makefile.am | 1 + json/fwd.hpp | 35 +++++++++++++++++++++++++++++++++++ json/tree.hpp | 8 +------- 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 json/fwd.hpp diff --git a/Makefile.am b/Makefile.am index c06d01a0..886924f8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ UTIL_FILES = \ ip.cpp \ ip.hpp \ iterator.hpp \ + json/fwd.hpp \ json/except.cpp \ json/except.hpp \ json/flat.cpp \ diff --git a/json/fwd.hpp b/json/fwd.hpp new file mode 100644 index 00000000..e3b07ed7 --- /dev/null +++ b/json/fwd.hpp @@ -0,0 +1,35 @@ +/* + * This file is part of libgim. + * + * libgim is free software: you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * libgim is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with libgim. If not, see . + * + * Copyright 2015 Danny Robson + */ + +#ifndef __UTIL_JSON_FWD_HPP +#define __UTIL_JSON_FWD_HPP + +namespace json { + namespace tree { + class node; + class object; + class array; + class string; + class number; + class boolean; + class null; + } +} + +#endif diff --git a/json/tree.hpp b/json/tree.hpp index a5adbe56..d8d784e9 100644 --- a/json/tree.hpp +++ b/json/tree.hpp @@ -30,15 +30,9 @@ #include "../iterator.hpp" #include "./flat.hpp" +#include "./fwd.hpp" namespace json { namespace tree { - class node; - class object; - class array; - class string; - class number; - class boolean; - class null; /// Parse an encoded form of JSON into a tree structure extern std::unique_ptr parse (const boost::filesystem::path &path);