2010-10-27 07:11:31 -05:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 15:00:32 -05:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2009-08-07 03:25:27 -05:00
|
|
|
|
2009-09-08 07:59:07 -05:00
|
|
|
#ifndef INCLUDED_CONFIGMGR_SOURCE_XCDPARSER_HXX
|
|
|
|
#define INCLUDED_CONFIGMGR_SOURCE_XCDPARSER_HXX
|
2009-08-07 03:25:27 -05:00
|
|
|
|
|
|
|
#include "sal/config.h"
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
|
2009-08-18 03:00:07 -05:00
|
|
|
#include "rtl/ref.hxx"
|
|
|
|
#include "rtl/ustring.hxx"
|
2010-09-10 06:09:38 -05:00
|
|
|
#include "xmlreader/xmlreader.hxx"
|
2009-08-07 03:25:27 -05:00
|
|
|
|
2009-09-08 07:59:07 -05:00
|
|
|
#include "parser.hxx"
|
2010-09-10 06:09:38 -05:00
|
|
|
|
|
|
|
namespace xmlreader { struct Span; }
|
2009-08-23 16:18:01 -05:00
|
|
|
|
2009-08-07 03:25:27 -05:00
|
|
|
namespace configmgr {
|
|
|
|
|
|
|
|
struct Data;
|
|
|
|
|
2009-08-18 03:00:07 -05:00
|
|
|
class XcdParser: public Parser {
|
|
|
|
public:
|
2012-11-29 04:23:09 -06:00
|
|
|
XcdParser(
|
|
|
|
int layer, std::set< OUString > const & processedDependencies,
|
|
|
|
Data & data);
|
2009-08-18 03:00:07 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
virtual ~XcdParser();
|
|
|
|
|
2010-09-10 06:09:38 -05:00
|
|
|
virtual xmlreader::XmlReader::Text getTextMode();
|
2009-08-31 09:22:09 -05:00
|
|
|
|
2009-08-18 03:00:07 -05:00
|
|
|
virtual bool startElement(
|
2012-11-29 04:23:09 -06:00
|
|
|
xmlreader::XmlReader & reader, int nsId, xmlreader::Span const & name,
|
|
|
|
std::set< OUString > const * existingDependencies);
|
2009-08-18 03:00:07 -05:00
|
|
|
|
2010-09-10 06:09:38 -05:00
|
|
|
virtual void endElement(xmlreader::XmlReader const & reader);
|
2009-08-18 03:00:07 -05:00
|
|
|
|
2010-09-10 06:09:38 -05:00
|
|
|
virtual void characters(xmlreader::Span const & text);
|
2009-08-18 03:00:07 -05:00
|
|
|
|
|
|
|
enum State {
|
|
|
|
STATE_START, STATE_DEPENDENCIES, STATE_DEPENDENCY, STATE_COMPONENTS };
|
|
|
|
|
|
|
|
int layer_;
|
2012-11-29 04:23:09 -06:00
|
|
|
std::set< OUString > const & processedDependencies_;
|
2010-03-26 05:06:19 -05:00
|
|
|
Data & data_;
|
2009-08-18 03:00:07 -05:00
|
|
|
State state_;
|
2012-12-10 15:06:10 -06:00
|
|
|
OUString dependencyFile_;
|
2012-11-29 04:23:09 -06:00
|
|
|
bool dependencyOptional_;
|
2009-08-18 03:00:07 -05:00
|
|
|
rtl::Reference< Parser > nestedParser_;
|
|
|
|
long nesting_;
|
2009-08-07 03:25:27 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 07:11:31 -05:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|