aboutsummaryrefslogtreecommitdiff
path: root/src/support/filesystem_context.h
blob: eefc4a38d1cf7d612cc6972c400adfb881968d52 (plain)
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
#ifndef INPUTXSLT_SRC_SUPPORT_FILESYSTEM_CONTEXT_H_
#define INPUTXSLT_SRC_SUPPORT_FILESYSTEM_CONTEXT_H_

#include <xalanc/XalanDOM/XalanDOMString.hpp>
#include <xalanc/XPath/Function.hpp>

#include <boost/filesystem.hpp>

#include <string>
#include <functional>

#include "common.h"

namespace InputXSLT {

class FilesystemContext {
	public:
		static void iterate(
			const boost::filesystem::path&,
			const std::function<void(const boost::filesystem::path&)>&
		);

		explicit FilesystemContext(const boost::filesystem::path&);
		explicit FilesystemContext(const std::string&);
		FilesystemContext();

		boost::filesystem::path resolve(const xalan::XalanDOMString&) const;
		boost::filesystem::path resolve(const boost::filesystem::path&) const;

		boost::filesystem::path getBase() const;

	private:
		const boost::filesystem::path path_;

};

}

#endif  // INPUTXSLT_SRC_SUPPORT_FILESYSTEM_CONTEXT_H_