Skip to content

Commit

Permalink
moved hash and equal_to in separate file since it is a property of th…
Browse files Browse the repository at this point in the history
…e container
  • Loading branch information
drexlerd committed Aug 14, 2024
1 parent d13f790 commit 18b10de
Show file tree
Hide file tree
Showing 46 changed files with 1,099 additions and 1,060 deletions.
14 changes: 0 additions & 14 deletions include/loki/details/pddl/action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#define LOKI_INCLUDE_LOKI_PDDL_ACTION_HPP_

#include "loki/details/pddl/declarations.hpp"
#include "loki/details/pddl/equal_to.hpp"
#include "loki/details/pddl/hash.hpp"

#include <optional>
#include <string>
Expand Down Expand Up @@ -64,18 +62,6 @@ class ActionImpl
const std::optional<Effect>& get_effect() const;
};

template<>
struct UniquePDDLHasher<const ActionImpl*>
{
size_t operator()(const ActionImpl* e) const;
};

template<>
struct UniquePDDLEqualTo<const ActionImpl*>
{
bool operator()(const ActionImpl* l, const ActionImpl* r) const;
};

extern std::ostream& operator<<(std::ostream& out, const ActionImpl& element);

}
Expand Down
14 changes: 0 additions & 14 deletions include/loki/details/pddl/atom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#define LOKI_INCLUDE_LOKI_PDDL_ATOM_HPP_

#include "loki/details/pddl/declarations.hpp"
#include "loki/details/pddl/equal_to.hpp"
#include "loki/details/pddl/hash.hpp"

#include <string>

Expand Down Expand Up @@ -51,18 +49,6 @@ class AtomImpl
const TermList& get_terms() const;
};

template<>
struct UniquePDDLHasher<const AtomImpl*>
{
size_t operator()(const AtomImpl* e) const;
};

template<>
struct UniquePDDLEqualTo<const AtomImpl*>
{
bool operator()(const AtomImpl* l, const AtomImpl* r) const;
};

extern std::ostream& operator<<(std::ostream& out, const AtomImpl& element);

}
Expand Down
14 changes: 0 additions & 14 deletions include/loki/details/pddl/axiom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#define LOKI_INCLUDE_LOKI_PDDL_DERIVED_PREDICATE_HPP_

#include "loki/details/pddl/declarations.hpp"
#include "loki/details/pddl/equal_to.hpp"
#include "loki/details/pddl/hash.hpp"

#include <string>

Expand Down Expand Up @@ -55,18 +53,6 @@ class AxiomImpl
size_t get_num_parameters_to_ground_head() const;
};

template<>
struct UniquePDDLHasher<const AxiomImpl*>
{
size_t operator()(const AxiomImpl* e) const;
};

template<>
struct UniquePDDLEqualTo<const AxiomImpl*>
{
bool operator()(const AxiomImpl* l, const AxiomImpl* r) const;
};

extern std::ostream& operator<<(std::ostream& out, const AxiomImpl& element);

}
Expand Down
98 changes: 0 additions & 98 deletions include/loki/details/pddl/conditions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#define LOKI_INCLUDE_LOKI_PDDL_CONDITIONS_HPP_

#include "loki/details/pddl/declarations.hpp"
#include "loki/details/pddl/equal_to.hpp"
#include "loki/details/pddl/hash.hpp"

#include <string>

Expand Down Expand Up @@ -201,102 +199,6 @@ class ConditionForallImpl
const Condition& get_condition() const;
};

template<>
struct UniquePDDLHasher<const ConditionLiteralImpl&>
{
size_t operator()(const ConditionLiteralImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionAndImpl&>
{
size_t operator()(const ConditionAndImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionOrImpl&>
{
size_t operator()(const ConditionOrImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionNotImpl&>
{
size_t operator()(const ConditionNotImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionImplyImpl&>
{
size_t operator()(const ConditionImplyImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionExistsImpl&>
{
size_t operator()(const ConditionExistsImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionForallImpl&>
{
size_t operator()(const ConditionForallImpl& e) const;
};

template<>
struct UniquePDDLHasher<const ConditionImpl*>
{
size_t operator()(const ConditionImpl* e) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionLiteralImpl&>
{
bool operator()(const ConditionLiteralImpl& l, const ConditionLiteralImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionAndImpl&>
{
bool operator()(const ConditionAndImpl& l, const ConditionAndImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionOrImpl&>
{
bool operator()(const ConditionOrImpl& l, const ConditionOrImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionNotImpl&>
{
bool operator()(const ConditionNotImpl& l, const ConditionNotImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionImplyImpl&>
{
bool operator()(const ConditionImplyImpl& l, const ConditionImplyImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionExistsImpl&>
{
bool operator()(const ConditionExistsImpl& l, const ConditionExistsImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionForallImpl&>
{
bool operator()(const ConditionForallImpl& l, const ConditionForallImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const ConditionImpl*>
{
bool operator()(const ConditionImpl* l, const ConditionImpl* r) const;
};

extern std::ostream& operator<<(std::ostream& out, const ConditionLiteralImpl& element);
extern std::ostream& operator<<(std::ostream& out, const ConditionAndImpl& element);
extern std::ostream& operator<<(std::ostream& out, const ConditionOrImpl& element);
Expand Down
5 changes: 0 additions & 5 deletions include/loki/details/pddl/declarations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ using PDDLElement = const T*;
* Utils
*/

template<typename T>
struct Hasher;
template<typename T>
struct EqualTo;

template<typename HolderType, typename Hash, typename EqualTo>
class UniqueFactory;

Expand Down
14 changes: 0 additions & 14 deletions include/loki/details/pddl/domain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#define LOKI_INCLUDE_LOKI_PDDL_DOMAIN_HPP_

#include "loki/details/pddl/declarations.hpp"
#include "loki/details/pddl/equal_to.hpp"
#include "loki/details/pddl/hash.hpp"
#include "loki/details/utils/filesystem.hpp"

#include <optional>
Expand Down Expand Up @@ -77,18 +75,6 @@ class DomainImpl
const AxiomList& get_axioms() const;
};

template<>
struct UniquePDDLHasher<const DomainImpl*>
{
size_t operator()(const DomainImpl* e) const;
};

template<>
struct UniquePDDLEqualTo<const DomainImpl*>
{
bool operator()(const DomainImpl* l, const DomainImpl* r) const;
};

extern std::ostream& operator<<(std::ostream& out, const DomainImpl& element);

}
Expand Down
74 changes: 0 additions & 74 deletions include/loki/details/pddl/effects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#define LOKI_INCLUDE_LOKI_PDDL_EFFECTS_HPP_

#include "loki/details/pddl/declarations.hpp"
#include "loki/details/pddl/equal_to.hpp"
#include "loki/details/pddl/hash.hpp"

#include <string>

Expand Down Expand Up @@ -166,78 +164,6 @@ class EffectConditionalWhenImpl
const Effect& get_effect() const;
};

template<>
struct UniquePDDLHasher<const EffectLiteralImpl&>
{
size_t operator()(const EffectLiteralImpl& e) const;
};

template<>
struct UniquePDDLHasher<const EffectAndImpl&>
{
size_t operator()(const EffectAndImpl& e) const;
};

template<>
struct UniquePDDLHasher<const EffectNumericImpl&>
{
size_t operator()(const EffectNumericImpl& e) const;
};

template<>
struct UniquePDDLHasher<const EffectConditionalForallImpl&>
{
size_t operator()(const EffectConditionalForallImpl& e) const;
};

template<>
struct UniquePDDLHasher<const EffectConditionalWhenImpl&>
{
size_t operator()(const EffectConditionalWhenImpl& e) const;
};

template<>
struct UniquePDDLHasher<const EffectImpl*>
{
size_t operator()(const EffectImpl* e) const;
};

template<>
struct UniquePDDLEqualTo<const EffectLiteralImpl&>
{
bool operator()(const EffectLiteralImpl& l, const EffectLiteralImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const EffectAndImpl&>
{
bool operator()(const EffectAndImpl& l, const EffectAndImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const EffectNumericImpl&>
{
bool operator()(const EffectNumericImpl& l, const EffectNumericImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const EffectConditionalForallImpl&>
{
bool operator()(const EffectConditionalForallImpl& l, const EffectConditionalForallImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const EffectConditionalWhenImpl&>
{
bool operator()(const EffectConditionalWhenImpl& l, const EffectConditionalWhenImpl& r) const;
};

template<>
struct UniquePDDLEqualTo<const EffectImpl*>
{
bool operator()(const EffectImpl* l, const EffectImpl* r) const;
};

extern std::ostream& operator<<(std::ostream& out, const EffectLiteralImpl& element);
extern std::ostream& operator<<(std::ostream& out, const EffectAndImpl& element);
extern std::ostream& operator<<(std::ostream& out, const EffectNumericImpl& element);
Expand Down
Loading

0 comments on commit 18b10de

Please sign in to comment.