1 
2 /* Web Polygraph       http://www.web-polygraph.org/
3  * (C) 2003-2014 The Measurement Factory
4  * Licensed under the Apache License, Version 2.0 */
5 
6 #ifndef POLYGRAPH__CLIENT_MIMEHEADERSCFG_H
7 #define POLYGRAPH__CLIENT_MIMEHEADERSCFG_H
8 
9 
10 #include "pgl/pgl.h"
11 #include "pgl/PglContainerSym.h"
12 
13 
14 class ArraySym;
15 
16 
17 // Manages MIME headers array configuration.
18 class MimeHeadersCfg: public ContainerSym::Visitor {
19 	public:
20 		MimeHeadersCfg(const ArraySym &sym);
21 
22 		void selectHeaders(Visitor &v) const;
23 
24 		virtual void visit(const SynSym &item);
25 
hasMacros()26 		bool hasMacros() const { return hasMacros_; }
27 
Clashes()28 		static bool Clashes() { return SawClash; }
29 
30 	private:
31 		const ArraySym *const theSym;
32 
33 		/* cached hasMacros() answer */
34 		bool checkedMacros_; // whether hasMacros_ has been computed
35 		bool hasMacros_; // whether at least one ${macro} is present in values
36 
37 		// whether Polygraph generates some user-configured header(s)
38 		static bool SawClash;
39 };
40 
41 #endif
42