本文整理汇总了C++中PropertyAccessor::getter_char方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyAccessor::getter_char方法的具体用法?C++ PropertyAccessor::getter_char怎么用?C++ PropertyAccessor::getter_char使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyAccessor
的用法示例。
在下文中一共展示了PropertyAccessor::getter_char方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: t___get
Variant c_XMLReader::t___get(Variant name) {
INSTANCE_METHOD_INJECTION_BUILTIN(XMLReader, XMLReader::__get);
const xmlChar *retchar = NULL;
int retint = 0;
PropertyAccessor *propertyMap = xmlreader_properties_map.get(name);
if (m_ptr) {
if (propertyMap->getter_char) {
retchar = propertyMap->getter_char(m_ptr);
} else if (propertyMap->getter_int) {
retint = propertyMap->getter_int(m_ptr);
}
}
switch (propertyMap->return_type) {
case KindOfString:
if (retchar) {
return String((char*)retchar, CopyString);
} else {
return String("");
}
case KindOfBoolean:
return (retint ? true : false);
case KindOfInt64:
return retint;
default:
return null;
}
return null;
}
示例2: t___get
Variant c_XMLReader::t___get(Variant name) {
const xmlChar *retchar = NULL;
int retint = 0;
PropertyAccessor *propertyMap = xmlreader_properties_map.get(name);
if (!propertyMap) {
raiseUndefProp(name.getStringData());
return uninit_null();
}
if (m_ptr) {
if (propertyMap->getter_char) {
retchar = propertyMap->getter_char(m_ptr);
} else if (propertyMap->getter_int) {
retint = propertyMap->getter_int(m_ptr);
}
}
switch (propertyMap->return_type) {
case KindOfString:
if (retchar) {
return String((char*)retchar, CopyString);
} else {
return String("");
}
case KindOfBoolean:
return (retint ? true : false);
case KindOfInt64:
return retint;
default:
return uninit_null();
}
return uninit_null();
}