-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathExists.h
44 lines (29 loc) · 754 Bytes
/
Exists.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
#ifndef _EXISTS_H_
#define _EXISTS_H_
#include "ParamCond.h"
class Exists : public ParamCond {
public:
Condition * cond;
Exists()
: cond( 0 ) {}
Exists( const Exists * e, Domain & d )
: ParamCond( e ), cond( 0 ) {
if ( e->cond ) cond = e->cond->copy( d );
}
~Exists() {
if ( cond ) delete cond;
}
void print( std::ostream & s ) const {
s << "Exists" << params << ":\n";
cond->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 addParams( int m, unsigned n ) {
cond->addParams( m, n );
}
Condition * copy( Domain & d ) {
return new Exists( this, d );
}
};
#endif