summaryrefslogtreecommitdiff
path: root/utils/DirPath.h
diff options
context:
space:
mode:
authorchatty1992-12-15 10:55:33 +0000
committerchatty1992-12-15 10:55:33 +0000
commit3a4838bed13b767132cbdf06364b2658da6cc356 (patch)
treef6d7b33264c4634d069409ba3169126823ac4090 /utils/DirPath.h
parent23abb4b87c7e40ed259dd02f653516f60e55ade4 (diff)
downloadivy-league-3a4838bed13b767132cbdf06364b2658da6cc356.zip
ivy-league-3a4838bed13b767132cbdf06364b2658da6cc356.tar.gz
ivy-league-3a4838bed13b767132cbdf06364b2658da6cc356.tar.bz2
ivy-league-3a4838bed13b767132cbdf06364b2658da6cc356.tar.xz
Initial revision
Diffstat (limited to 'utils/DirPath.h')
-rw-r--r--utils/DirPath.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/utils/DirPath.h b/utils/DirPath.h
new file mode 100644
index 0000000..3fe377e
--- /dev/null
+++ b/utils/DirPath.h
@@ -0,0 +1,44 @@
+/*
+ * CENA C++ Utilities
+ *
+ * by Stephane Chatty
+ *
+ * Copyright 1991, 1992
+ * Laboratoire de Recherche en Informatique (LRI)
+ * Centre d'Etudes de la Navigation Aerienne (CENA)
+ *
+ * management of search paths
+ *
+ * $Id$
+ * $CurLog$
+ */
+
+
+#ifndef DirPath_H_
+#define DirPath_H_
+
+#include "cplus_bugs.h"
+#include "List.h"
+
+class CcuDirPath : public CcuList {
+public:
+ enum alloc_mode { DontAllocNames, DoAllocNames };
+private:
+ alloc_mode Alloc;
+public:
+ CcuDirPath ();
+ CcuDirPath (alloc_mode);
+ CcuDirPath (const char*);
+ CcuDirPath (const char*, const char*, ...);
+ ~CcuDirPath ();
+ void Append (const char*);
+ void Prepend (const char*);
+ void AppendEnvPath (const char*, char sep = ':');
+ int Remove (const char*);
+inline void SetAlloc (alloc_mode alloc) { Alloc = alloc; }
+ const char* FindFile (const char*, alloc_mode);
+inline const char* FindFile (const char* fn) { return FindFile (fn, Alloc); }
+};
+
+#endif /* DirPath_H_ */
+