KEY2ParserUtils.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libetonyek project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef KEY2PARSERUTILS_H_INCLUDED
00011 #define KEY2PARSERUTILS_H_INCLUDED
00012 
00013 #include <utility>
00014 
00015 #include <boost/optional.hpp>
00016 
00017 #include "KEYTypes_fwd.h"
00018 
00019 namespace libetonyek
00020 {
00021 
00022 class KEYXMLReader;
00023 
00028 class KEY2ParserUtils
00029 {
00030   // disable copying
00031   KEY2ParserUtils(const KEY2ParserUtils &other);
00032   KEY2ParserUtils &operator=(const KEY2ParserUtils &other);
00033 
00034 public:
00035   virtual ~KEY2ParserUtils();
00036 
00044   static boost::optional<ID_t> readID(const KEYXMLReader &reader);
00045 
00055   static ID_t readRef(const KEYXMLReader &reader);
00056 
00062   static std::pair<boost::optional<double>, boost::optional<double> > readPoint(const KEYXMLReader &reader);
00063 
00069   static KEYPosition readPosition(const KEYXMLReader &reader);
00070 
00076   static KEYSize readSize(const KEYXMLReader &reader);
00077 
00083   static bool bool_cast(const char *value);
00084 
00085   static double deg2rad(double value);
00086 
00087 protected:
00088   KEY2ParserUtils();
00089 };
00090 
00091 }
00092 
00093 #endif // KEY2PARSERUTILS_H_INCLUDED
00094 
00095 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */