本文整理汇总了C++中QName::nameSpace方法的典型用法代码示例。如果您正苦于以下问题:C++ QName::nameSpace方法的具体用法?C++ QName::nameSpace怎么用?C++ QName::nameSpace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QName
的用法示例。
在下文中一共展示了QName::nameSpace方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
QList<TypeMap::Entry>::ConstIterator TypeMap::elementEntry( const QName &typeName ) const
{
QList<Entry>::ConstIterator it;
for ( it = mElementMap.constBegin(); it != mElementMap.constEnd(); ++it ) {
if ( (*it).typeName == typeName.localName() && (*it).nameSpace == typeName.nameSpace() )
break;
}
return it;
}
示例2: forwardDeclarationsForAttribute
QStringList TypeMap::forwardDeclarationsForAttribute( const QName &typeName ) const
{
QList<Entry>::ConstIterator it;
for ( it = mAttributeMap.constBegin(); it != mAttributeMap.constEnd(); ++it ) {
if ( (*it).typeName == typeName.localName() && (*it).nameSpace == typeName.nameSpace() )
return (*it).forwardDeclarations;
}
return QStringList();
}
示例3: localTypeForAttribute
QString TypeMap::localTypeForAttribute( const QName &typeName ) const
{
QList<Entry>::ConstIterator it;
for ( it = mAttributeMap.constBegin(); it != mAttributeMap.constEnd(); ++it ) {
if ( (*it).typeName == typeName.localName() && (*it).nameSpace == typeName.nameSpace() )
return (*it).localType;
}
return QString();
}
示例4: findElement
XSD::Element WSDL::findElement( const QName &elementName ) const
{
const XSD::Types types = mDefinitions.type().types();
const XSD::Element::List elements = types.elements();
for ( int i = 0; i < elements.count(); ++i ) {
if ( elements[ i ].nameSpace() == elementName.nameSpace() && elements[ i ].name() == elementName.localName() )
return elements[ i ];
}
return XSD::Element();
}
示例5: findBinding
Binding WSDL::findBinding( const QName &bindingName ) const
{
const Binding::List list = mDefinitions.bindings();
Binding::List::ConstIterator it;
for ( it = list.constBegin(); it != list.constEnd(); ++it ) {
if ( (*it).name() == bindingName.localName() && (*it).nameSpace() == bindingName.nameSpace() ) {
return *it;
}
}
return Binding();
}
示例6: findMessage
Message WSDL::findMessage( const QName &messageName ) const
{
const Message::List list = mDefinitions.messages();
Message::List::ConstIterator it;
for ( it = list.constBegin(); it != list.constEnd(); ++it ) {
if ( (*it).name() == messageName.localName() && (*it).nameSpace() == messageName.nameSpace() ) {
return *it;
}
}
qDebug( "findMessage: no match found for '%s'!", qPrintable( messageName.qname() ) );
return Message();
}
示例7: findPortType
PortType WSDL::findPortType( const QName &portTypeName ) const
{
const PortType::List list = mDefinitions.portTypes();
PortType::List::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
if ( (*it).name() == portTypeName.localName() && (*it).nameSpace() == portTypeName.nameSpace() ) {
return *it;
}
}
qDebug( "findPortType: no match found for '%s'!", qPrintable( portTypeName.qname() ) );
return PortType();
}
示例8: generate
KODE::Code ElementArgumentSerializer::generate() const
{
Q_ASSERT(!mLocalVarName.isEmpty());
Q_ASSERT(!mOutputVarName.isEmpty());
const QString varAndMethodBefore = mOutputVarName + (mAppend ? QLatin1String(".append(") : QLatin1String(" = "));
const QString varAndMethodAfter = mAppend ? QString::fromLatin1(")") : QString();
KODE::Code block;
// for debugging, add this:
//block += "// type: " + type.qname() + " element:" + elementType.qname();
//if ( name.localName() == "..." )
// qDebug() << "appendElementArg:" << name << "type=" << type << "isBuiltin=" << mTypeMap.isBuiltinType(type) << "isQualified=" << isQualified;
if ( mTypeMap.isTypeAny( mType ) ) {
block += QLatin1String("if (!") + mLocalVarName + QLatin1String(".isNull()) {");
block.indent();
block += varAndMethodBefore + mLocalVarName + varAndMethodAfter + QLatin1String(";") + COMMENT;
block.unindent();
block += "}";
} else {
const QName actualType = mType.isEmpty() ? mElementType : mType;
const QString typeArgs = namespaceString(actualType.nameSpace()) + QLatin1String(", QString::fromLatin1(\"") + actualType.localName() + QLatin1String("\")");
const bool isComplex = mTypeMap.isComplexType( mType, mElementType );
const bool isPolymorphic = mTypeMap.isPolymorphic( mType, mElementType );
if ( mAppend && mOmitIfEmpty ) {
if ( mUsePointer ) {
block += "if (" + mLocalVarName + ") {";
} else {
block += "if (!" + mLocalVarName + "_nil) {";
}
block.indent();
}
if ( isComplex ) {
const QString op = (isPolymorphic || mUsePointer) ? "->" : ".";
block += QLatin1String("KDSoapValue ") + mValueVarName + QLatin1Char('(') + mLocalVarName + op + QLatin1String("serialize(") + mNameArg + QLatin1String("));") + COMMENT;
} else {
if ( mTypeMap.isBuiltinType( mType, mElementType ) ) {
const QString qtTypeName = mTypeMap.localType( mType, mElementType );
const QString value = mTypeMap.serializeBuiltin( mType, mElementType, mLocalVarName, qtTypeName );
block += QLatin1String("KDSoapValue ") + mValueVarName + QLatin1String("(" )+ mNameArg + QLatin1String(", ") + value + QLatin1String(", ") + typeArgs + QLatin1String(");") + COMMENT;
} else {
block += QLatin1String("KDSoapValue ") + mValueVarName + QLatin1String("(") + mNameArg + QLatin1String(", ") + mLocalVarName + QLatin1String(".serialize(), ") + typeArgs + QLatin1String(");") + COMMENT;
}
}
if ( !mNameNamespace.isEmpty() )
block += mValueVarName + QLatin1String(".setNamespaceUri(") + mNameNamespace + QLatin1String(");");
if ( mIsQualified )
block += mValueVarName + QLatin1String(".setQualified(true);");
if ( mNillable )
block += mValueVarName + QLatin1String(".setNillable(true);");
if ( mAppend && mOmitIfEmpty ) { // omit empty children (testcase: MSExchange, no <ParentFolderIds/>)
block += "if (!" + mValueVarName + ".isNil())";
}
block += varAndMethodBefore + mValueVarName + varAndMethodAfter + QLatin1String(";") + COMMENT;
if ( mAppend && mOmitIfEmpty ) {
block.unindent();
block += "}";
}
}
return block;
}
示例9: setElementName
void ElementArgumentSerializer::setElementName( const QName &name )
{
mNameArg = QLatin1String("QString::fromLatin1(\"") + name.localName() + QLatin1String("\")");
mNameNamespace = namespaceString(name.nameSpace());
mValueVarName = QLatin1String("_value") + upperlize(KODE::Style::makeIdentifier(name.localName()));
}
示例10: return
bool QName::operator == (const QName &qname) const {
return (qname.nameSpace() == _nameSpace && qname.localName() == _localName);
}