-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDerived.h
43 lines (28 loc) · 853 Bytes
/
Derived.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
#ifndef _DERIVED_H_
#define _DERIVED_H_
#include "Lifted.h"
class Derived : public Lifted {
public:
Condition * cond;
Lifted * lifted;
Derived()
: Lifted(), cond( 0 ), lifted( 0 ) {}
Derived( const std::string s )
: Lifted( s ), cond( 0 ), lifted( 0 ) {}
Derived( const Derived * z, Domain & d );
void print( std::ostream & stream ) const {
stream << "Derived ";
ParamCond::print( stream );
if ( cond ) cond->print( stream );
}
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 ) {
for ( unsigned i = 0; i < params.size(); ++i )
if ( params[i] >= m ) params[i] += n;
}
Condition * copy( Domain & d ) {
return new Derived( this, d );
}
};
#endif