MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / InitData

Method InitData

src/plugin/kernel/src/AFNodeManager.cpp:41–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void AFNodeManager::InitData(const AFIDataList& args)
42{
43 size_t count = args.GetCount();
44 ARK_ASSERT_RET_NONE(count % 2 == 0);
45
46 for (size_t i = 0; i < count; i += 2)
47 {
48 auto data_type = args.GetType(i);
49 auto index = args.UInt(i + 1);
50 switch (data_type)
51 {
52 case ark::ArkDataType::DT_BOOLEAN:
53 {
54 AFINode* pNode = FindData(index);
55 if (pNode != nullptr)
56 {
57 pNode->SetBool(args.Bool(i));
58 }
59 }
60 break;
61 case ark::ArkDataType::DT_INT32:
62 {
63 AFINode* pNode = FindData(index);
64 if (pNode != nullptr)
65 {
66 pNode->SetInt32(args.Int(i));
67 }
68 }
69 break;
70 case ark::ArkDataType::DT_UINT32:
71 {
72 AFINode* pNode = FindData(index);
73 if (pNode != nullptr)
74 {
75 pNode->SetUInt32(args.UInt(i));
76 }
77 }
78 break;
79 case ark::ArkDataType::DT_INT64:
80 {
81 AFINode* pNode = FindData(index);
82 if (pNode != nullptr)
83 {
84 pNode->SetInt64(args.Int64(i));
85 }
86 }
87 break;
88 case ark::ArkDataType::DT_UINT64:
89 {
90 AFINode* pNode = FindData(index);
91 if (pNode != nullptr)
92 {
93 pNode->SetUInt64(args.UInt64(i));
94 }
95 }
96 break;
97 case ark::ArkDataType::DT_FLOAT:
98 {

Callers

nothing calls this directly

Calls 15

UIntMethod · 0.80
BoolMethod · 0.80
IntMethod · 0.80
Int64Method · 0.80
UInt64Method · 0.80
FloatMethod · 0.80
DoubleMethod · 0.80
StringMethod · 0.80
GetCountMethod · 0.45
GetTypeMethod · 0.45
SetBoolMethod · 0.45
SetInt32Method · 0.45

Tested by

no test coverage detected