The accumulated state passed between Clauses that ultimately results in a new Binding.
More...
#include <sauce/internal/clause.h>
The accumulated state passed between Clauses that ultimately results in a new Binding.
◆ ClauseState()
36 :
37 bindings(bindings),
38 pendingThrower(pendingThrower),
39 pendingBinding(),
40 providerBinding(),
41 dynamicName(unnamed()),
42 dynamicDependencyNames() {
44 }
void throwAnyPending()
Throw and clear any saved exception.
Definition: pending_thrower.h:46
◆ ~ClauseState()
virtual sauce::internal::ClauseState::~ClauseState |
( |
| ) |
|
|
inlinevirtual |
46 {
47 if (pendingBinding.get() == NULL) {
48 return;
49 }
50
51 pendingBinding->setName(dynamicName);
52 pendingBinding->setDynamicDependencyNames(dynamicDependencyNames);
53
54 if (pendingBinding.get() != NULL) {
55 bindings.put(pendingBinding);
56 }
57
58 if (providerBinding.get() != NULL) {
59 bindings.put(providerBinding);
60 }
61 }
◆ bind()
void sauce::internal::ClauseState::bind |
( |
OpaqueBindingPtr |
pendingBinding | ) |
|
|
inline |
63 {
64 this->pendingBinding = pendingBinding;
65 }
◆ bindDynamicDependencyName()
void sauce::internal::ClauseState::bindDynamicDependencyName |
( |
unsigned int |
position, |
|
|
std::string const |
name |
|
) |
| |
|
inline |
75 {
76 if (dynamicDependencyNames.size() <= position) {
77 dynamicDependencyNames.resize(position + 1, unnamed());
78 }
79 dynamicDependencyNames[position] = name;
80 }
◆ bindProvider()
void sauce::internal::ClauseState::bindProvider |
( |
OpaqueBindingPtr |
providerBinding | ) |
|
|
inline |
67 {
68 this->providerBinding = providerBinding;
69 }
◆ clearException()
void sauce::internal::ClauseState::clearException |
( |
| ) |
|
|
inline |
87 {
88 pendingThrower.
clear();
89 }
PendingThrow clear()
Clear and return any saved exception.
Definition: pending_thrower.h:58
◆ setDynamicName()
void sauce::internal::ClauseState::setDynamicName |
( |
std::string const |
name | ) |
|
|
inline |
71 {
72 this->dynamicName = name;
73 }
◆ throwLater()
void sauce::internal::ClauseState::throwLater |
( |
| ) |
|
|
inline |
83 {
84 pendingThrower.template throwLater<Exception>();
85 }
The documentation for this class was generated from the following file: