本文整理汇总了C++中PNEANet::GetSAttrNameN方法的典型用法代码示例。如果您正苦于以下问题:C++ PNEANet::GetSAttrNameN方法的具体用法?C++ PNEANet::GetSAttrNameN怎么用?C++ PNEANet::GetSAttrNameN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PNEANet
的用法示例。
在下文中一共展示了PNEANet::GetSAttrNameN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
TEST(TNEANet, GetSAttrNameN) {
PNEANet Graph;
Graph = TNEANet::New();
TInt AttrId;
Graph->AddSAttrN("TestInt", atInt, AttrId);
Graph->AddSAttrN("TestFlt", atFlt, AttrId);
Graph->AddSAttrN("TestStr", atStr, AttrId);
TAttrType AttrType;
TStr Name;
int status = Graph->GetSAttrNameN(0, Name, AttrType);
EXPECT_EQ(0, status);
EXPECT_EQ(atInt, AttrType);
EXPECT_STREQ("TestInt", Name.CStr());
status = Graph->GetSAttrNameN(1, Name, AttrType);
EXPECT_EQ(0, status);
EXPECT_EQ(atFlt, AttrType);
EXPECT_STREQ("TestFlt", Name.CStr());
status = Graph->GetSAttrNameN(2, Name, AttrType);
EXPECT_EQ(0, status);
EXPECT_EQ(atStr, AttrType);
EXPECT_STREQ("TestStr", Name.CStr());
status = Graph->GetSAttrNameN(3, Name, AttrType);
EXPECT_EQ(-1, status);
}