xref: /trunk/main/l10ntools/inc/treeconfig.hxx (revision 07ec2dae6a42189124ed7f901d54c35a0555ec96)
1983d4c8aSAndrew Rist /**************************************************************
2983d4c8aSAndrew Rist  *
3983d4c8aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4983d4c8aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5983d4c8aSAndrew Rist  * distributed with this work for additional information
6983d4c8aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7983d4c8aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8983d4c8aSAndrew Rist  * "License"); you may not use this file except in compliance
9983d4c8aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10983d4c8aSAndrew Rist  *
11983d4c8aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12983d4c8aSAndrew Rist  *
13983d4c8aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14983d4c8aSAndrew Rist  * software distributed under the License is distributed on an
15983d4c8aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16983d4c8aSAndrew Rist  * KIND, either express or implied.  See the License for the
17983d4c8aSAndrew Rist  * specific language governing permissions and limitations
18983d4c8aSAndrew Rist  * under the License.
19983d4c8aSAndrew Rist  *
20983d4c8aSAndrew Rist  *************************************************************/
21983d4c8aSAndrew Rist 
22cdf0e10cSrcweir #include <vector>
23cdf0e10cSrcweir #include <string>
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include "inireader.hxx"
26cdf0e10cSrcweir 
27*07ec2daeSmseidel namespace transex3
28*07ec2daeSmseidel {
29cdf0e10cSrcweir 
30cdf0e10cSrcweir class Treeconfig
31cdf0e10cSrcweir {
32cdf0e10cSrcweir 
33cdf0e10cSrcweir     private:
34cdf0e10cSrcweir         INIreader   inireader;
35cdf0e10cSrcweir         INImap      map;
36cdf0e10cSrcweir         bool        has_config_file;
37cdf0e10cSrcweir         void getCurrentDir( string& dir );
38cdf0e10cSrcweir         bool isConfigFilePresent();
39cdf0e10cSrcweir 
40cdf0e10cSrcweir     public:
41cdf0e10cSrcweir 
Treeconfig()42cdf0e10cSrcweir         Treeconfig() : has_config_file( false ) { parseConfig(); }
43cdf0e10cSrcweir         // read the config file, returns true in case a config file had been found
44cdf0e10cSrcweir         bool parseConfig();
45cdf0e10cSrcweir         // returns a string vector containing all active repositories, returns true in case we are deep inside
46*07ec2daeSmseidel         // of a source tree. This could affect the behavior of the tool
47cdf0e10cSrcweir         bool getActiveRepositories( vector<string>& active_repos);
48cdf0e10cSrcweir };
49cdf0e10cSrcweir 
50cdf0e10cSrcweir }
51*07ec2daeSmseidel 
52*07ec2daeSmseidel /* vim: set noet sw=4 ts=4: */
53