1a2faadffSAndrew Rist /************************************************************** 2a2faadffSAndrew Rist * 3a2faadffSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4a2faadffSAndrew Rist * or more contributor license agreements. See the NOTICE file 5a2faadffSAndrew Rist * distributed with this work for additional information 6a2faadffSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7a2faadffSAndrew Rist * to you under the Apache License, Version 2.0 (the 8a2faadffSAndrew Rist * "License"); you may not use this file except in compliance 9a2faadffSAndrew Rist * with the License. You may obtain a copy of the License at 10a2faadffSAndrew Rist * 11a2faadffSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12a2faadffSAndrew Rist * 13a2faadffSAndrew Rist * Unless required by applicable law or agreed to in writing, 14a2faadffSAndrew Rist * software distributed under the License is distributed on an 15a2faadffSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16a2faadffSAndrew Rist * KIND, either express or implied. See the License for the 17a2faadffSAndrew Rist * specific language governing permissions and limitations 18a2faadffSAndrew Rist * under the License. 19a2faadffSAndrew Rist * 20a2faadffSAndrew Rist *************************************************************/ 21a2faadffSAndrew Rist 22a2faadffSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef INCLUDED_CONFIGMGR_SOURCE_MODIFICATIONS_HXX 25cdf0e10cSrcweir #define INCLUDED_CONFIGMGR_SOURCE_MODIFICATIONS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "sal/config.h" 28cdf0e10cSrcweir 29*e9832dfcSHerbert Dürr #include <boost/unordered_map.hpp> // using the boost container because it explicitly allows recursive types 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include "boost/noncopyable.hpp" 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include "path.hxx" 34*e9832dfcSHerbert Dürr #include "rtl/ustring.hxx" 35cdf0e10cSrcweir 36cdf0e10cSrcweir namespace configmgr { 37cdf0e10cSrcweir 38cdf0e10cSrcweir class Modifications: private boost::noncopyable { 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir struct Node { 41*e9832dfcSHerbert Dürr typedef boost::unordered_map< rtl::OUString, Node, rtl::OUStringHash > Children; 42cdf0e10cSrcweir 43cdf0e10cSrcweir Children children; 44cdf0e10cSrcweir }; 45cdf0e10cSrcweir 46cdf0e10cSrcweir Modifications(); 47cdf0e10cSrcweir 48cdf0e10cSrcweir ~Modifications(); 49cdf0e10cSrcweir 50cdf0e10cSrcweir void add(Path const & path); 51cdf0e10cSrcweir 52cdf0e10cSrcweir void remove(Path const & path); 53cdf0e10cSrcweir 54cdf0e10cSrcweir Node const & getRoot() const; 55cdf0e10cSrcweir 56cdf0e10cSrcweir private: 57cdf0e10cSrcweir Node root_; 58cdf0e10cSrcweir }; 59cdf0e10cSrcweir 60cdf0e10cSrcweir } 61cdf0e10cSrcweir 62cdf0e10cSrcweir #endif 63