pl_search_cpp 1.4
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
pl_search::ChoicePred Class Reference

Represents a choice predicate. More...

#include <pred.hpp>

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

Public Member Functions

 ChoicePred (Engine *eng, ChoiceIteratorPtr ch)
 Constructs a ChoicePred with the given choice iterator.
 
void initialize_call () override
 Initializes the predicate call.
 
bool apply_choice () override
 Applies a choice for the choice predicate.
 
bool more_choices () override
 Checks if there are more choices for the choice predicate.
 
- 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.
 
bool is_non_det ()
 Determines if the predicate is non-deterministic.
 
void wrap_with_once ()
 Wraps the predicate with a once.
 
virtual ~Pred ()=default
 Virtual destructor for proper cleanup.
 
std::string get_name ()
 For debugging.
 

Public Attributes

ChoiceIteratorPtr choice_iterator
 Pointer to the choice iterator.
 

Additional Inherited Members

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

Detailed Description

Represents a choice predicate.

Constructor & Destructor Documentation

◆ ChoicePred()

pl_search::ChoicePred::ChoicePred ( Engine eng,
ChoiceIteratorPtr  ch 
)
inline

Constructs a ChoicePred with the given choice iterator.

Parameters
engPointer to the engine.
chPointer to the choice iterator.

Member Function Documentation

◆ apply_choice()

bool pl_search::ChoicePred::apply_choice ( )
overridevirtual

Applies a choice for the choice predicate.

Returns
True if the choice is applied successfully, false otherwise.

Reimplemented from pl_search::Pred.

◆ initialize_call()

void pl_search::ChoicePred::initialize_call ( )
inlineoverridevirtual

Initializes the predicate call.

Reimplemented from pl_search::Pred.

◆ more_choices()

bool pl_search::ChoicePred::more_choices ( )
overridevirtual

Checks if there are more choices for the choice predicate.

Returns
True if there are more choices, false otherwise.

Reimplemented from pl_search::Pred.

Member Data Documentation

◆ choice_iterator

ChoiceIteratorPtr pl_search::ChoicePred::choice_iterator

Pointer to the choice iterator.


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