RxDock
0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
include
rxdock
DirectorySource.h
1
/***********************************************************************
2
* The rDock program was developed from 1998 - 2006 by the software team
3
* at RiboTargets (subsequently Vernalis (R&D) Ltd).
4
* In 2006, the software was licensed to the University of York for
5
* maintenance and distribution.
6
* In 2012, Vernalis and the University of York agreed to release the
7
* program as Open Source software.
8
* This version is licensed under GNU-LGPL version 3.0 with support from
9
* the University of Barcelona.
10
* http://rdock.sourceforge.net/
11
***********************************************************************/
12
13
#ifndef _RBTDIRECTORYSOURCE_H_
14
#define _RBTDIRECTORYSOURCE_H_
15
16
#include "rxdock/Config.h"
17
#include "rxdock/FileError.h"
// for exception types
18
#include <dirent.h>
// for scandir()
19
#include <fstream>
// ditto
20
#include <sys/stat.h>
// for stat()
21
#include <sys/types.h>
22
23
namespace
rxdock {
24
25
const
unsigned
int
PATH_SIZE = 1024;
// max path width
26
const
unsigned
int
LINE_WIDTH = 256;
// max num of chars in a line
27
const
unsigned
int
ALL = 0;
// read all files in directory
28
35
class
DirectorySource
{
36
protected
:
37
struct
stat fStat;
// stat struct for file access check
38
#ifdef COMMENT
39
#ifdef linux
40
struct
dirent **fNameList;
// file name list in directory
41
#endif
42
#ifdef sun
// for gcc
43
struct
direct **fNameList;
// file name list in directory
44
#endif
45
#endif
// COMMENT
46
int
fNum;
// number of files in the dir
47
struct
dirent **fNameList;
// file name list in directory
48
std::ifstream inFile;
// an actual file to read
49
std::string thePath;
// leading path
50
void
CheckDirectory(std::string &);
// to check directory access
51
52
public
:
53
DirectorySource
(
const
std::string &);
54
virtual
~DirectorySource
();
55
56
static
const
std::string _CT;
57
64
// virtual void ReadFiles()=0;
65
// virtual void ParseLines()=0;
66
};
67
68
}
// namespace rxdock
69
70
#endif
// _RBTDIRECTORYSOURCE_H_
rxdock::DirectorySource
Definition
DirectorySource.h:35
Generated by
1.9.7