MCPcopy Create free account
hub / github.com/XpuOS/xsched / CopyConstructor

Method CopyConstructor

sched/src/protocol/operation.cpp:8–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6using namespace xsched::sched;
7
8std::shared_ptr<const Operation> Operation::CopyConstructor(const void *data)
9{
10 auto meta = (const OperationMeta *)data;
11 switch (meta->type)
12 {
13 case kOperationTerminate:
14 return std::make_shared<TerminateOperation>(data);
15 case kOperationSched:
16 return std::make_shared<SchedOperation>(data);
17 case kOperationConfig:
18 return std::make_shared<ConfigOperation>(data);
19 default:
20 XERRO("unsupported operation type: %d", meta->type);
21 return nullptr;
22 }
23}
24
25SchedOperation::SchedOperation(const void *data)
26{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected