pl_search_cpp 1.8
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
pl_search::OnceEnd Class Reference

#include <pred.hpp>

Inheritance diagram for pl_search::OnceEnd:
Inheritance graph
[legend]
Collaboration diagram for pl_search::OnceEnd:
Collaboration graph
[legend]

Public Member Functions

 OnceEnd (Engine *eng)
 
bool initialize_call () override
 Initializes the predicate call.
 
bool apply_choice () override
 Pop the environment stack to the corresponding Once predicate. This removes further choices (choicepoints) from predicates called after the Once predicate was called.
 
void set_env_index (int index)
 
- Public Member Functions inherited from pl_search::DetPred
 DetPred (Engine *eng)
 Represents a deterministic predicate.
 
- Public Member Functions inherited from pl_search::SemiDetPred
 SemiDetPred (Engine *eng)
 Represents a semi-deterministic predicate.
 
bool more_choices () override
 Applies a choice.
 
bool must_push () override
 Determines if the predicate needs to be pushed onto the environment stack when called.
 
- Public Member Functions inherited from pl_search::Pred
 Pred (Engine *eng)
 Default constructor.
 
PredPtr get_continuation ()
 Gets the continuation of the predicate.
 
virtual void set_continuation (PredPtr cont)
 Sets the continuation of the predicate.
 
PredPtr last_pred ()
 Follows the continuation chain to the last predicate.
 
virtual ~Pred ()=default
 Virtual destructor for proper cleanup.
 
virtual std::string get_name ()
 For debugging.
 

Protected Attributes

int env_index
 
- Protected Attributes inherited from pl_search::Pred
PredPtr continuation
 The continuation of the predicate.
 
Engineengine
 

Constructor & Destructor Documentation

◆ OnceEnd()

pl_search::OnceEnd::OnceEnd ( Engine eng)
inline

Member Function Documentation

◆ apply_choice()

bool pl_search::OnceEnd::apply_choice ( )
overridevirtual

Pop the environment stack to the corresponding Once predicate. This removes further choices (choicepoints) from predicates called after the Once predicate was called.

Returns
True

Reimplemented from pl_search::DetPred.

◆ initialize_call()

bool pl_search::OnceEnd::initialize_call ( )
inlineoverridevirtual

Initializes the predicate call.

Returns
True if the initialization is successful, false otherwise.

Reimplemented from pl_search::Pred.

◆ set_env_index()

void pl_search::OnceEnd::set_env_index ( int  index)
inline

Member Data Documentation

◆ env_index

int pl_search::OnceEnd::env_index
protected

The documentation for this class was generated from the following files: