1*983d4c8aSAndrew Rist /************************************************************** 2*983d4c8aSAndrew Rist * 3*983d4c8aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*983d4c8aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*983d4c8aSAndrew Rist * distributed with this work for additional information 6*983d4c8aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*983d4c8aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*983d4c8aSAndrew Rist * "License"); you may not use this file except in compliance 9*983d4c8aSAndrew Rist * with the License. You may obtain a copy of the License at 10*983d4c8aSAndrew Rist * 11*983d4c8aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*983d4c8aSAndrew Rist * 13*983d4c8aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*983d4c8aSAndrew Rist * software distributed under the License is distributed on an 15*983d4c8aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*983d4c8aSAndrew Rist * KIND, either express or implied. See the License for the 17*983d4c8aSAndrew Rist * specific language governing permissions and limitations 18*983d4c8aSAndrew Rist * under the License. 19*983d4c8aSAndrew Rist * 20*983d4c8aSAndrew Rist *************************************************************/ 21*983d4c8aSAndrew Rist 22cdf0e10cSrcweir #include <vector> 23cdf0e10cSrcweir #include <string> 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include "inireader.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir namespace transex3{ 28cdf0e10cSrcweir 29cdf0e10cSrcweir class Treeconfig 30cdf0e10cSrcweir { 31cdf0e10cSrcweir 32cdf0e10cSrcweir private: 33cdf0e10cSrcweir INIreader inireader; 34cdf0e10cSrcweir INImap map; 35cdf0e10cSrcweir bool has_config_file; 36cdf0e10cSrcweir void getCurrentDir( string& dir ); 37cdf0e10cSrcweir bool isConfigFilePresent(); 38cdf0e10cSrcweir 39cdf0e10cSrcweir public: 40cdf0e10cSrcweir Treeconfig()41cdf0e10cSrcweir Treeconfig() : has_config_file( false ) { parseConfig(); } 42cdf0e10cSrcweir // read the config file, returns true in case a config file had been found 43cdf0e10cSrcweir bool parseConfig(); 44cdf0e10cSrcweir // returns a string vector containing all active repositories, returns true in case we are deep inside 45cdf0e10cSrcweir // of a source tree. This could affect the behavour of the tool 46cdf0e10cSrcweir bool getActiveRepositories( vector<string>& active_repos); 47cdf0e10cSrcweir }; 48cdf0e10cSrcweir 49cdf0e10cSrcweir } 50