ARB
Main Page
Namespaces
Classes
Files
File List
File Members
CONVERTALN
input_format.h
Go to the documentation of this file.
1
#ifndef INPUT_FORMAT_H
2
#define INPUT_FORMAT_H
3
4
#ifndef SEQ_H
5
#include "
seq.h
"
6
#endif
7
#ifndef DEFS_H
8
#include "
defs.h
"
9
#endif
10
11
class
FormatReader
;
12
13
struct
OutputFormat
{
14
virtual
~OutputFormat
() { }
15
virtual
Format
format
()
const
= 0;
16
};
17
18
// all input formats have to be output formats:
19
class
InputFormat
:
public
OutputFormat
,
virtual
Noncopyable
{
20
mutable
char
*id;
// id of entry (=short-name)
21
22
virtual
char
*create_id()
const
= 0;
23
public
:
24
InputFormat
() : id(
NULp
) {}
25
~InputFormat
()
OVERRIDE
{ freenull(
id
); }
26
27
virtual
void
reinit
() = 0;
28
Format
format
() const
OVERRIDE
= 0;
29
30
const
char
*
get_id
()
const
{
31
if
(!
id
)
id
= create_id();
32
return
id;
33
}
34
};
35
36
typedef
SmartPtr<InputFormat>
InputFormatPtr
;
37
typedef
SmartPtr<OutputFormat>
OutputFormatPtr
;
38
39
#else
40
#error input_format.h included twice
41
#endif // INPUT_FORMAT_H
Format
Format
Definition:
fun.h:10
InputFormatPtr
SmartPtr< InputFormat > InputFormatPtr
Definition:
input_format.h:36
InputFormat
Definition:
input_format.h:19
InputFormat::format
Format format() const OVERRIDE=0
defs.h
InputFormat::~InputFormat
~InputFormat() OVERRIDE
Definition:
input_format.h:25
OutputFormat::~OutputFormat
virtual ~OutputFormat()
Definition:
input_format.h:14
SmartPtr
Generic smart pointer.
Definition:
smartptr.h:149
seq.h
InputFormat::get_id
const char * get_id() const
Definition:
input_format.h:30
OutputFormat::format
virtual Format format() const =0
InputFormat::reinit
virtual void reinit()=0
OVERRIDE
#define OVERRIDE
Definition:
cxxforward.h:110
OutputFormat
Definition:
input_format.h:13
FormatReader
Definition:
reader.h:69
NULp
#define NULp
Definition:
cxxforward.h:114
OutputFormatPtr
SmartPtr< OutputFormat > OutputFormatPtr
Definition:
input_format.h:37
InputFormat::InputFormat
InputFormat()
Definition:
input_format.h:24
Noncopyable
Definition:
arbtools.h:39
Generated by
1.8.8