summaryrefslogtreecommitdiffstats
path: root/soltools/mkdepend/collectdircontent.hxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /soltools/mkdepend/collectdircontent.hxx
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'soltools/mkdepend/collectdircontent.hxx')
-rw-r--r--soltools/mkdepend/collectdircontent.hxx60
1 files changed, 60 insertions, 0 deletions
diff --git a/soltools/mkdepend/collectdircontent.hxx b/soltools/mkdepend/collectdircontent.hxx
new file mode 100644
index 0000000000..6821b76430
--- /dev/null
+++ b/soltools/mkdepend/collectdircontent.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#ifndef INCLUDED_SOLTOOLS_MKDEPEND_COLLECTDIRCONTENT_HXX
+#define INCLUDED_SOLTOOLS_MKDEPEND_COLLECTDIRCONTENT_HXX
+
+#if defined __cplusplus
+
+#include <set>
+#include <map>
+#include <string>
+
+#if defined(_WIN32)
+#if !defined WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <algorithm>
+#else
+#include <dirent.h>
+#endif // defined( _WIN32 )
+
+#include <iostream>
+
+typedef std::set<std::string> DirContent;
+typedef std::map<std::string, DirContent> DirMap;
+typedef DirMap::value_type EntriesPair;
+typedef std::pair<std::string, std::string> PathFilePair;
+
+
+struct IncludesCollection {
+private:
+ DirMap allIncludes;
+ static PathFilePair split_path(const std::string& filePath);
+ void add_to_collection(const std::string& dirPath);
+
+public:
+ bool exists(std::string filePath);
+};
+
+#else
+
+struct IncludesCollection;
+
+#endif
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+struct IncludesCollection * create_IncludesCollection(void);
+void delete_IncludesCollection(struct IncludesCollection *);
+
+int call_IncludesCollection_exists(struct IncludesCollection* m, const char* filePath);
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */