File: dpstringlist.h

package info (click to toggle)
dpuser 4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,628 kB
  • sloc: cpp: 148,693; ansic: 18,648; fortran: 5,815; lex: 1,116; makefile: 760; yacc: 741; sh: 390; pascal: 98
file content (52 lines) | stat: -rw-r--r-- 1,321 bytes parent folder | download | duplicates (4)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef DPSTRINGLIST_H
#define DPSTRINGLIST_H

#ifdef WIN
#pragma warning(disable:4786)
#endif

#include <vector>

#include "dpstring.h"

class dpStringList : public std::vector<dpString> {
public:
//@    dpStringList();
//@    dpStringList(const dpStringList &);
//@    ~dpStringList();

//@    dpStringList &operator=(const dpStringList &);
	dpint64 count() const;
	void append(const dpString &);
	void prepend(const dpString &);
    void remove(dpStringList::iterator);
	void operator +=(const dpStringList &);
    void operator +=(const char *);
    dpString first();
    bool readFile(const dpString &);
    static dpStringList split(const char, dpString &);
    static dpStringList splitcrlf(dpString &);

    const char *getFileName() const;
    void setFileName(const char *fname);
    const char *getColumnName() const;
    void setColumnName(const char *cname);

private:
    std::string columnName,
                fileName;
//@    char *columnName,
//@         *fileName;
};

class dpDir {
public:
	static dpString currentDirPath();
	static dpStringList findfile(const dpString &);
	static dpStringList dir(const dpString &);

private:
	static void walk(const dpString &, const dpString &, const dpString &, dpStringList &);
};

#endif /* DPSTRINGLIST_H */