pl_search_cpp 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
pl_search::FailPred Class Reference

Represents a failure predicate that always fails when called. More...

#include <pred.hpp>

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

Public Member Functions

 FailPred (Trail *trail)
 Constructs a FailPred with the given trail -it does nothing and always fails when called.
 
void set_continuation (PredPtr cont) override
 Sets the continuation of the predicate.
 
bool call () override
 call method for FailPred always returns false, indicating failure.
 
- Public Member Functions inherited from pl_search::Pred
 Pred (Trail *trail)
 Default constructor.
 
PredPtr get_continuation ()
 Gets the continuation of the predicate.
 
PredPtr last_pred ()
 Follows the continuation chain to the last predicate.
 
virtual void call_init ()
 Initialize call.
 
bool call_continuation ()
 Calls the continuation of the predicate - first call_init and then call.
 
virtual ~Pred ()=default
 Virtual destructor for proper cleanup.
 
virtual std::string get_name ()
 For debugging.
 

Additional Inherited Members

- Protected Attributes inherited from pl_search::Pred
PredPtr continuation
 The continuation of the predicate.
 
Trailtrail
 Pointer to the trail for managing variable bindings.
 

Detailed Description

Represents a failure predicate that always fails when called.

Constructor & Destructor Documentation

◆ FailPred()

pl_search::FailPred::FailPred ( Trail trail)
inline

Constructs a FailPred with the given trail -it does nothing and always fails when called.

Parameters
trailPointer to the trail.

Member Function Documentation

◆ call()

bool pl_search::FailPred::call ( )
inlineoverridevirtual

call method for FailPred always returns false, indicating failure.

Returns
False, indicating failure.

Reimplemented from pl_search::Pred.

◆ set_continuation()

void pl_search::FailPred::set_continuation ( PredPtr  cont)
inlineoverridevirtual

Sets the continuation of the predicate.

Parameters
contA shared pointer to the continuation predicate.

Reimplemented from pl_search::Pred.


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