Invocation: simplest render-node test PASS
Review the achievements from the last days and map out the further path for test-driven build-up of a render-node network and invocation. Notably ''several layers of prototyping'' are in the works now; it is important to understand the purpose of each such round of prototyping and to draw the necessary conclusions after closing out. The next topic to investigate relates to the ''identity'' of nodes and ports within nodes; this entails to generate a ''symbolic spec'' that can be verified and used as base for a systematic hash-ID and cache-key...
This commit is contained in:
parent
c29c10fd62
commit
9022a69a71
3 changed files with 823 additions and 149 deletions
|
|
@ -72,6 +72,8 @@ namespace engine {
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Rebuild the Node Invocation
|
||||
class ProcNode;
|
||||
class ProcNodeDiagnostic;
|
||||
|
||||
// typedef ProcNode* PNode;
|
||||
using ProcNodeRef = std::reference_wrapper<ProcNode>;
|
||||
using OptionalBuff = std::optional<BuffHandle>;
|
||||
|
|
@ -116,7 +118,7 @@ namespace engine {
|
|||
Ports ports;
|
||||
Leads leads;
|
||||
|
||||
NodeID const& nodeID;
|
||||
NodeID const& nodeID; /////////////////////////////////OOO seems to belong rather into the ProcNode
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Rebuild the Node Invocation
|
||||
|
||||
|
|
@ -212,10 +214,38 @@ namespace engine {
|
|||
#endif /////////////////////////////////////////////////////////////////////////////////////////////////////////////UNIMPLEMENTED :: TICKET #1367 : Rebuild the Node Invocation
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Rebuild the Node Invocation
|
||||
|
||||
/// „backdoor“ to watch internals from tests
|
||||
friend class ProcNodeDiagnostic;
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Rebuild the Node Invocation
|
||||
class ProcNodeDiagnostic
|
||||
: util::MoveOnly
|
||||
{
|
||||
ProcNode& n_;
|
||||
|
||||
public:
|
||||
ProcNodeDiagnostic (ProcNode& theNode)
|
||||
: n_{theNode}
|
||||
{ }
|
||||
|
||||
auto& leads() { return n_.wiring_.leads; }
|
||||
auto& ports() { return n_.wiring_.ports; }
|
||||
|
||||
bool
|
||||
isValid()
|
||||
{
|
||||
return 0 < ports().size();
|
||||
///////////////////////////////////////////////////TODO 10/2024 more to verify here
|
||||
}
|
||||
};
|
||||
|
||||
inline ProcNodeDiagnostic
|
||||
watch (ProcNode& theNode)
|
||||
{
|
||||
return ProcNodeDiagnostic{theNode};
|
||||
}
|
||||
|
||||
|
||||
}} // namespace steam::engine
|
||||
|
|
|
|||
|
|
@ -78,6 +78,12 @@ namespace test {
|
|||
.build();
|
||||
CHECK (isnil (con.leads));
|
||||
CHECK (1 == con.ports.size());
|
||||
|
||||
// can build a ProcNode with this connectivity
|
||||
ProcNode n1{move(con)};
|
||||
CHECK (watch(n1).isValid());
|
||||
CHECK (watch(n1).leads().empty());
|
||||
CHECK (watch(n1).ports().size() == 1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue