KEYStyleContext.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 KEYSTYLECONTEXT_H_INCLUDED
00011 #define KEYSTYLECONTEXT_H_INCLUDED
00012 
00013 #include <deque>
00014 
00015 #include <boost/any.hpp>
00016 
00017 #include "KEYStyle.h"
00018 
00019 namespace libetonyek
00020 {
00021 
00034 class KEYStyleContext
00035 {
00041   typedef std::deque<KEYStylePtr_t> Stack_t;
00042 
00043 public:
00046   KEYStyleContext();
00047 
00054   void push(const KEYStylePtr_t &style);
00055 
00058   void pop();
00059 
00073   boost::any find(const std::string &property, bool lookInParent = false) const;
00074 
00075 private:
00076   Stack_t m_stack;
00077 };
00078 
00079 }
00080 
00081 #endif // KEYSTYLECONTEXT_H_INCLUDED
00082 
00083 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */