/// searching directory for file.
+/**
+
+ Abstraction of PATH variable. An interface for searching input files.
+ Search a number of dirs for a file.
+
+ Should use kpathsea?
+
+*/
+
class File_path : private Array<String>
{
public:
Array<String>::push;
void add(String str) { push(str); }
};
-/**
-
- Abstraction of PATH variable. An interface for searching input files.
- Search a number of dirs for a file.
-
- Should use kpathsea?
-
-*/
-
/// split path into its components
void split_path(String path, String &drive, String &dirs, String &filebase, String &extension);
/// cursor to go with PointerList
+/**
+ don't create PointerList<void*>'s.
+ This cursor is just an interface class for Cursor. It takes care of the
+ appropriate type casts
+ */
template<class T>
struct PCursor : private Cursor<void *> {
friend class IPointerList<T>;
return Cursor<void*>::compare(a,b);
}
};
-/**
- don't create PointerList<void*>'s.
- This cursor is just an interface class for Cursor. It takes care of the
- appropriate type casts
- */
#include "list.hh"
/// Use for list of pointers, e.g. PointerList<AbstractType*>.
+/**
+ This class does no deletion of the pointers, but it knows how to
+ copy itself (shallow copy). We could have derived it from List<T>,
+ but this design saves a lot of code dup; for all PointerLists in the
+ program only one parent List<void*> is instantiated. */
template<class T>
class PointerList : public List<void *>
{
void concatenate(PointerList<T> const &s) { List<void*>::concatenate(s); }
PointerList() {}
};
-/**
- This class does no deletion of the pointers, but it knows how to
- copy itself (shallow copy). We could have derived it from List<T>,
- but this design saves a lot of code dup; for all PointerLists in the
- program only one parent List<void*> is instantiated. */
/// pl. which deletes pointers given to it.
-template<class T>
-struct IPointerList : public PointerList<T> {
- IPointerList(const IPointerList&) { set_empty(); }
- IPointerList() { }
- ~IPointerList();
-};
/**
NOTE:
You have to copy this yourself, or use the macro PointerList__copy
*/
+template<class T>
+struct IPointerList : public PointerList<T> {
+ IPointerList(const IPointerList&) { set_empty(); }
+ IPointerList() { }
+ ~IPointerList();
+};
#define IPointerList__copy(T, to, from, op) \
for (PCursor<T> _pc_(from); _pc_.ok(); _pc_++)\