xref: /aoo42x/main/tools/bootstrp/cppdep.hxx (revision 8b851043)
1*8b851043SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*8b851043SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*8b851043SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*8b851043SAndrew Rist  * distributed with this work for additional information
6*8b851043SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*8b851043SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*8b851043SAndrew Rist  * "License"); you may not use this file except in compliance
9*8b851043SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*8b851043SAndrew Rist  *
11*8b851043SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*8b851043SAndrew Rist  *
13*8b851043SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*8b851043SAndrew Rist  * software distributed under the License is distributed on an
15*8b851043SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*8b851043SAndrew Rist  * KIND, either express or implied.  See the License for the
17*8b851043SAndrew Rist  * specific language governing permissions and limitations
18*8b851043SAndrew Rist  * under the License.
19*8b851043SAndrew Rist  *
20*8b851043SAndrew Rist  *************************************************************/
21*8b851043SAndrew Rist 
22*8b851043SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #include <tools/list.hxx>
25cdf0e10cSrcweir #include <tools/string.hxx>
26cdf0e10cSrcweir #define PATH_SEP ":"
27cdf0e10cSrcweir #define DIR_SEP	"/"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir DECLARE_LIST( ByteStringList, ByteString * )
30cdf0e10cSrcweir 
31cdf0e10cSrcweir class CppDep
32cdf0e10cSrcweir {
33cdf0e10cSrcweir 	ByteString			aSourceFile;
34cdf0e10cSrcweir 	ByteStringList		*pSearchPath;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir protected:
37cdf0e10cSrcweir 	ByteStringList		*pFileList;
38cdf0e10cSrcweir 	ByteStringList		*pSources;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir 	sal_Bool			Search( ByteString aFileName );
41cdf0e10cSrcweir 	ByteString		Exists( ByteString aFileName );
42cdf0e10cSrcweir 
43cdf0e10cSrcweir 	ByteString		IsIncludeStatement( ByteString aLine );
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir 					CppDep( ByteString aFileName );
46cdf0e10cSrcweir 					CppDep();
47cdf0e10cSrcweir 					virtual ~CppDep();
48cdf0e10cSrcweir 	virtual void	Execute();
49cdf0e10cSrcweir 
GetDepList()50cdf0e10cSrcweir 	ByteStringList*		GetDepList(){return pFileList;}
51cdf0e10cSrcweir 	sal_Bool			AddSearchPath( const char* aPath );
52cdf0e10cSrcweir 	sal_Bool			AddSource( const char * aSource );
53cdf0e10cSrcweir };
54cdf0e10cSrcweir 
55