MCPcopy Create free account
hub / github.com/RaftLib/RaftLib / initialize

Method initialize

src/allocate.cpp:57–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void
58Allocate::initialize( PortInfo * const src,
59 PortInfo * const dst,
60 FIFO * const fifo )
61{
62 assert( fifo != nullptr );
63 assert( dst != nullptr );
64 assert( src != nullptr );
65 if( src->getFIFO() != nullptr )
66 {
67 throw PortDoubleInitializeException(
68 "Source port \"" + src->my_name + "\" already initialized!" );
69 }
70 if( dst->getFIFO() != nullptr )
71 {
72 throw PortDoubleInitializeException(
73 "Destination port \"" + dst->my_name + "\" already initialized!" );
74 }
75 src->setFIFO( fifo );
76 dst->setFIFO( fifo );
77 /** NOTE: this list simply speeds up the monitoring if we want it **/
78 allocated_fifo.insert( fifo );
79}
80
81
82void

Callers 1

runMethod · 0.80

Calls 3

getFIFOMethod · 0.80
setFIFOMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected