Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef IWORKSTYLECONTEXT_H_INCLUDED
00011 #define IWORKSTYLECONTEXT_H_INCLUDED
00012
00013 #include <string>
00014
00015 #include <boost/optional.hpp>
00016
00017 #include "IWORKPropertyMap.h"
00018 #include "IWORKStyle_fwd.h"
00019 #include "IWORKXMLContextBase.h"
00020
00021 namespace libetonyek
00022 {
00023
00024 class IWORKStyleContext : public IWORKXMLElementContextBase
00025 {
00026 public:
00027 IWORKStyleContext(IWORKXMLParserState &state, IWORKStyleMap_t *styleMap = 0, bool nested = false);
00028 IWORKStyleContext(IWORKXMLParserState &state, IWORKPropertyMap &props, IWORKStyleMap_t *styleMap = 0, bool nested = false);
00029 IWORKStyleContext(IWORKXMLParserState &state, IWORKPropertyMap &props, IWORKStyleMap_t *styleMap = 0, const char *defaultParent = 0, bool nested = false);
00030
00031 virtual void attribute(int name, const char *value);
00032 virtual void endOfElement();
00033
00034 private:
00035 virtual IWORKXMLContextPtr_t element(int name);
00036
00037 private:
00038 IWORKStyleMap_t *const m_styleMap;
00039 const std::string m_defaultParent;
00040 const bool m_nested;
00041 IWORKPropertyMap m_ownProps;
00042 IWORKPropertyMap &m_props;
00043 boost::optional<std::string> m_ident;
00044 boost::optional<std::string> m_parentIdent;
00045 };
00046
00047 }
00048
00049 #endif // IWORKSTYLECONTEXT_H_INCLUDED
00050
00051