forked from bonetblai/mini-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domains.h
62 lines (53 loc) · 1.89 KB
/
domains.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef DOMAINS_H
#define DOMAINS_H
#include "actions.h"
#include "functions.h"
#include "predicates.h"
#include "terms.h"
#include "types.h"
#include "requirements.h"
#include <iostream>
#include <map>
#include <string>
class Problem;
class Domain
{
public:
Requirements requirements;
class DomainMap : public std::map<std::string,const Domain*> { };
static DomainMap::const_iterator begin( void );
static DomainMap::const_iterator end( void );
static const Domain* find( const std::string& name );
static void clear( void );
private:
static DomainMap domains;
std::string name_;
TypeTable types_;
PredicateTable predicates_;
FunctionTable functions_;
TermTable terms_;
ActionSchemaMap actions_;
std::map<const StateFormula*,const Atom*> internal_hash_;
friend std::ostream& operator<<( std::ostream& os, const Domain& d );
public:
Domain( const std::string& name );
~Domain();
const std::string& name( void ) const { return( name_ ); }
TypeTable& types( void ) { return( types_ ); }
const TypeTable& types( void ) const { return( types_ ); }
PredicateTable& predicates( void ) { return( predicates_ ); }
const PredicateTable& predicates( void ) const { return( predicates_ ); }
FunctionTable& functions( void ) { return( functions_ ); }
const FunctionTable& functions( void ) const { return( functions_ ); }
TermTable& terms( void ) { return( terms_ ); }
const TermTable& terms( void ) const { return( terms_ ); }
void add_action( const ActionSchema& action );
const ActionSchema* find_action( const std::string& name ) const;
void compatible_constants( ObjectList& constants, Type type ) const;
void instantiated_actions( ActionList& actions,
std::map<const StateFormula*,const Atom*> &hash,
const problem_t& problem ) const;
void analyze_and_simplify( void );
};
std::ostream& operator<<( std::ostream& os, const Domain& d );
#endif // DOMAINS_H