File: FileStructure.h

package info (click to toggle)
fastdep 0.16-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 596 kB
  • ctags: 323
  • sloc: cpp: 2,144; ansic: 814; sh: 208; makefile: 124
file content (53 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef FILESTRUCTURE_H_
#define FILESTRUCTURE_H_

#include <string>

#include <time.h>

#include "If.h"

class CompileState;
class FileCache;
class Sequence;

class FileStructure
{
	public:
		FileStructure(const std::string& aFilename, FileCache* aCache, const char* aFile, unsigned int aLength);
		FileStructure(const FileStructure& anOther);
		virtual ~FileStructure();

		FileStructure& operator=(const FileStructure& anOther);

		void localInclude(const std::string& aFile);
		void systemInclude(const std::string& aFile);
		void define(const std::string& aName, const std::string& aParam, const std::string& aBody);
		void ifndef(const std::string& aName);
		void ifdef(const std::string& aName);
		void endif();
		void else_();
		void if_(const std::string& aName);
		void elif_(const std::string& aName);

		time_t getModificationTime() const;
		void setModificationTime(const time_t aTime);
		void getDependencies(CompileState* aState);

		FileCache* getCache();

		std::string getPath() const;
		std::string getFileName() const;

	private:
		time_t ModificationTime;
		std::string ResolvedName;

		Sequence* Main;
		Sequence* Current;
		FileCache* Cache;
		std::vector<If*> Scopes;
};

#endif