json/fwd: add forward declaration header

This commit is contained in:
Danny Robson 2015-03-18 15:46:16 +11:00
parent 5fd11fbe53
commit 5e20ee3a1d
3 changed files with 37 additions and 7 deletions

View File

@ -80,6 +80,7 @@ UTIL_FILES = \
ip.cpp \ ip.cpp \
ip.hpp \ ip.hpp \
iterator.hpp \ iterator.hpp \
json/fwd.hpp \
json/except.cpp \ json/except.cpp \
json/except.hpp \ json/except.hpp \
json/flat.cpp \ json/flat.cpp \

35
json/fwd.hpp Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*
* Copyright 2015 Danny Robson <danny@nerdcruft.net>
*/
#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

View File

@ -30,15 +30,9 @@
#include "../iterator.hpp" #include "../iterator.hpp"
#include "./flat.hpp" #include "./flat.hpp"
#include "./fwd.hpp"
namespace json { namespace tree { 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 /// Parse an encoded form of JSON into a tree structure
extern std::unique_ptr<node> parse (const boost::filesystem::path &path); extern std::unique_ptr<node> parse (const boost::filesystem::path &path);