-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathNot.h
49 lines (32 loc) · 829 Bytes
/
Not.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 _NOT_H_
#define _NOT_H_
#include "Ground.h"
class Not : public Condition {
public:
Ground * cond;
Not()
: cond( 0 ) {}
Not( Ground * g )
: cond( g ) {}
Not( const Not * n, Domain & d )
: cond( 0 ) {
if ( n->cond ) cond = ( Ground * )n->cond->copy( d );
}
~Not() {
if ( cond ) delete cond;
}
void print( std::ostream & s ) const {
s << "NOT ";
if ( cond ) 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 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 Not( this, d );
}
};
#endif