-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathForall.h
49 lines (33 loc) · 954 Bytes
/
Forall.h
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
#ifndef _FORALL_H_
#define _FORALL_H_
#include "ParamCond.h"
class Forall : public ParamCond {
public:
Condition * cond;
Condition * cond1;
Forall()
: cond( 0 ), cond1( 0 ) {}
Forall( const Forall * f, Domain & d )
: ParamCond( f ), cond( 0 ), cond1( 0 ) {
if ( f->cond ) cond = f->cond->copy( d );
}
~Forall() {
if ( cond ) delete cond;
if ( cond1 ) delete cond1;
}
void print( std::ostream & s ) const {
s << "Forall" << params << ":\n";
if ( cond ) cond->print( s );
if ( cond1 ) cond1->print( s );
}
void PDDLPrint( std::ostream & s, unsigned indent, const TokenStruct< std::string > & ts, Domain & d );
void parse( Filereader & f, TokenStruct< std::string > & ts, Domain & d );
void SHOPparse( Filereader & f, TokenStruct< std::string > & ts, Domain & d );
void addParams( int m, unsigned n ) {
cond->addParams( m, n );
}
Condition * copy( Domain & d ) {
return new Forall( this, d );
}
};
#endif