public:
NodeAttributeSetHistoryItem() {}
~NodeAttributeSetHistoryItem() {
- if (attribute) {
- mmi_attribute_destroy(attribute);
+ if (m_attribute) {
+ mmi_attribute_destroy(m_attribute);
}
}
void reset() {
- type = MMI_NODE_TYPE_NONE;
- sub_type = std::monostate();
- if (attribute) {
- mmi_attribute_destroy(attribute);
- attribute = nullptr;
+ m_type = MMI_NODE_TYPE_NONE;
+ m_sub_type = std::monostate();
+ if (m_attribute) {
+ mmi_attribute_destroy(m_attribute);
+ m_attribute = nullptr;
}
}
void set_item(
mmi_node_type_e type,
mmi_node_sub_type_e sub_type,
mmi_attribute_h attribute) {
- this->type = type;
- this->sub_type = sub_type;
- if (this->attribute) {
- mmi_attribute_destroy(this->attribute);
+ m_type = type;
+ m_sub_type = sub_type;
+ if (m_attribute) {
+ mmi_attribute_destroy(m_attribute);
}
- mmi_attribute_clone(attribute, &(this->attribute));
+ mmi_attribute_clone(attribute, &(m_attribute));
}
- mmi_node_type_e type{MMI_NODE_TYPE_NONE};
- mmi_node_sub_type_e sub_type{std::monostate()};
- mmi_attribute_h attribute{nullptr};
+ mmi_node_type_e m_type{MMI_NODE_TYPE_NONE};
+ mmi_node_sub_type_e m_sub_type{std::monostate()};
+ mmi_attribute_h m_attribute{nullptr};
};
static NodeAttributeSetHistoryItem g_last_node_attribute_set_history;
mmi_attribute_h attribute = nullptr;
mmi_attribute_create(value, "COMMAND", &attribute);
EXPECT_TRUE(workflow_instance->set_attribute(attribute));
- EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
- EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
- EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+ EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+ EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+ EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
MMI_NODE_PROCESSOR_TYPE_ASR);
- EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+ EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
mmi_primitive_value_h history_item_value;
- mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+ mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
mmi_primitive_value_type_e type;
mmi_primitive_value_get_type(history_item_value, &type);
mmi_attribute_h attribute = nullptr;
mmi_attribute_create(value, "COMMAND", &attribute);
EXPECT_TRUE(workflow_instance->set_attribute(attribute));
- EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
- EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
- EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+ EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+ EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+ EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
MMI_NODE_PROCESSOR_TYPE_ASR);
- EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+ EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
mmi_primitive_value_h history_item_value;
- mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+ mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
mmi_primitive_value_type_e type;
mmi_primitive_value_get_type(history_item_value, &type);
EXPECT_NE(workflow_instance, nullptr);
workflow_instance->initialize();
- EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
- EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
- EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+ EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+ EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+ EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
MMI_NODE_PROCESSOR_TYPE_ASR);
- EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+ EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
mmi_primitive_value_h history_item_value;
- mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+ mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
mmi_primitive_value_type_e type;
mmi_primitive_value_get_type(history_item_value, &type);
EXPECT_NE(workflow_instance, nullptr);
workflow_instance->initialize();
- EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
- EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
- EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+ EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+ EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+ EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
MMI_NODE_PROCESSOR_TYPE_ASR);
- EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+ EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
char *name = nullptr;
- mmi_attribute_get_name(g_last_node_attribute_set_history.attribute, &name);
+ mmi_attribute_get_name(g_last_node_attribute_set_history.m_attribute, &name);
EXPECT_STREQ(name, "CANDIDATE");
free(name);
mmi_primitive_value_h history_item_value;
- mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+ mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
mmi_primitive_value_type_e type;
mmi_primitive_value_get_type(history_item_value, &type);