当前位置: 首页>>代码示例>>C++>>正文


C++ QName类代码示例

本文整理汇总了C++中QName的典型用法代码示例。如果您正苦于以下问题:C++ QName类的具体用法?C++ QName怎么用?C++ QName使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: newType

ComplexType Parser::parseComplexType( ParserContext *context, const QDomElement &element )
{
  ComplexType newType( d->mNameSpace );

  newType.setName( element.attribute( QLatin1String("name") ) );

  if (debugParsing())
      qDebug() << "complexType:" << d->mNameSpace << newType.name();

  if ( element.hasAttribute( QLatin1String("mixed") ) )
    newType.setContentModel( XSDType::MIXED );

  QDomElement childElement = element.firstChildElement();

  AttributeGroup::List attributeGroups;
  Group::List groups;

  while ( !childElement.isNull() ) {
    NSManager namespaceManager( context, childElement );
    const QName name( childElement.tagName() );
    if ( name.localName() == QLatin1String("all") ) {
      all( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("sequence") || name.localName() == QLatin1String("choice") ) {
      Element::List elems;
      parseCompositor( context, childElement, newType.nameSpace(), &elems, &groups );
      foreach ( const Element& elem, elems )
          newType.addElement( elem );
    } else if ( name.localName() == QLatin1String("attribute") ) {
开发者ID:mbahar94,项目名称:KDSoap,代码行数:28,代码来源:parser.cpp

示例2: defaultPriority

eFlag Tree::insertRule(Sit S, XSLElement *tmpl)
{
  double prio;
  Attribute *a = tmpl -> atts.find(XSLA_PRIORITY);
  if (!a)
    prio = defaultPriority(tmpl);
  else
    {
      if (a -> cont.toDouble(prio))
	Err(S, ET_BAD_NUMBER);
    };
  QName q; 
  GP( QName ) mode = NULL;
  
  if (!!(a = tmpl -> atts.find(XSLA_NAME)))
    E( tmpl -> setLogical(S, q, a -> cont, FALSE) );
  
  if (q.getLocal() != UNDEF_PHRASE && 
      subtrees.getCurrent() -> getStructure() -> 
      rules().findByName(*this, q))
    {
      Str fullName;
      expandQStr(q, fullName);
      
      Err1(S, ET_DUPLICATE_RULE_NAME, fullName);
    };
  
  if (!!(a = tmpl -> atts.find(XSLA_MODE)))
    E( tmpl -> setLogical(S, *(mode = new QName), 
			  a -> cont, FALSE) );
  
  subtrees.getCurrent() -> getStructure() -> 
    rules().insert(new RuleItem(tmpl,prio,q,mode.keep()));
  return OK;
}
开发者ID:alepharchives,项目名称:Sablotron,代码行数:35,代码来源:tree.cpp

示例3: pRet

//=============================================================================
// ElementType::addAttributeType
// 
// Add a new attribute to our map
//
//=============================================================================
AutoPtr<AttributeType> ElementType::addAttributeType(const QName& name, bool bExternallyDeclared)
{
	QC_DBG_ASSERT(m_attributeTypeMap.find(name.getRawName()) == m_attributeTypeMap.end());
	AutoPtr<AttributeType> pRet(new AttributeType(*this, bExternallyDeclared, name));
	m_attributeTypeMap[name.getRawName()] = pRet;
	return pRet;
}
开发者ID:twangjie,项目名称:quickcpp,代码行数:13,代码来源:ElementType.cpp

示例4: endSubElement

void KeyHandler::endSubElement(const QName& qname, RecursiveHandler* parser) {
    if (strcmp(qname.localName(), kCancelTag) == 0)
        _result->setCancel(_integerHandler.result());
    else if (strcmp(qname.localName(), kFifthsTag) == 0)
        _result->setFifths(_integerHandler.result());
    else if (strcmp(qname.localName(), kModeTag) == 0)
        _result->setMode(modeFromString(_stringHandler.result()));
}
开发者ID:aleph7,项目名称:mxml,代码行数:8,代码来源:KeyHandler.cpp

示例5: endSubElement

void RestHandler::endSubElement(const QName& qname, RecursiveHandler* parser) {
    using dom::presentOptional;

    if (strcmp(qname.localName(), kDisplayStepTag) == 0)
        _result->setDisplayStep(presentOptional(PitchHandler::stepFromString(_stringHandler.result())));
    else if (strcmp(qname.localName(), kDisplayOctaveTag) == 0)
        _result->setDisplayOctave(presentOptional(_integerHandler.result()));
}
开发者ID:aleph7,项目名称:mxml,代码行数:8,代码来源:RestHandler.cpp

示例6:

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;
}
开发者ID:hporten,项目名称:KDSoap,代码行数:9,代码来源:typemap.cpp

示例7: 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();
}
开发者ID:hporten,项目名称:KDSoap,代码行数:10,代码来源:typemap.cpp

示例8: 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();
}
开发者ID:hporten,项目名称:KDSoap,代码行数:10,代码来源:typemap.cpp

示例9: 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();
}
开发者ID:cornelius,项目名称:kode,代码行数:12,代码来源:wsdl.cpp

示例10: cmpQNameStrings

Bool Tree::cmpQNameStrings(const QName &q, const Str& uri, const Str& local)
{
    if (q.getLocal() == stdPhrase(PHRASE_STAR))
        return (Bool)(
	    q.getUri() == UNDEF_PHRASE || dict().getKey(q.getUri()) == uri);
    else
    {
        return (Bool) 
  	        (dict().getKey(q.getUri()) == uri &&
            dict().getKey(q.getLocal()) == local);		
	}
}
开发者ID:alepharchives,项目名称:Sablotron,代码行数:12,代码来源:tree.cpp

示例11: 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();
}
开发者ID:cornelius,项目名称:kode,代码行数:13,代码来源:wsdl.cpp

示例12: 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();
}
开发者ID:cornelius,项目名称:kode,代码行数:13,代码来源:wsdl.cpp

示例13: cmpQNamesForeign

Bool Tree::cmpQNamesForeign(const QName &q, const HashTable& dictForeign, const QName &qForeign)
{
/*
    printf("comparing names (%s,%s,%s) and (%s,%s,%s)\n",
        (char*)(((Tree*)this)->expand(q.getPrefix())),
	    (char*)(((Tree*)this)->expand(q.getUri())),
	    (char*)(((Tree*)this)->expand(q.getLocal())),
        (char*)(dictForeign.getKey(qForeign.getPrefix())),
	    (char*)(dictForeign.getKey(qForeign.getUri())),
	    (char*)(dictForeign.getKey(qForeign.getLocal()))
	);
*/	

    if (q.getLocal() == stdPhrase(PHRASE_STAR))
    {
        return (Bool)(q.getPrefix() == UNDEF_PHRASE || 
            (dict().getKey(q.getUri()) == dictForeign.getKey(qForeign.getUri())));
	}
    else
    {
        return (Bool) 
	        (dict().getKey(q.getUri()) == dictForeign.getKey(qForeign.getUri()) &&
            dict().getKey(q.getLocal()) == dictForeign.getKey(qForeign.getLocal()));		
	}
}
开发者ID:alepharchives,项目名称:Sablotron,代码行数:25,代码来源:tree.cpp

示例14: newType

ComplexType Parser::parseComplexType( ParserContext *context, const QDomElement &element )
{
  ComplexType newType( d->mNameSpace );

  newType.setName( element.attribute( QLatin1String("name") ) );

  if (debugParsing())
      qDebug() << "complexType:" << d->mNameSpace << newType.name();

  if ( element.hasAttribute( QLatin1String("mixed") ) )
    newType.setContentModel( XSDType::MIXED );

  QDomElement childElement = element.firstChildElement();

  AttributeGroup::List attributeGroups;

  while ( !childElement.isNull() ) {
    NSManager namespaceManager( context, childElement );
    const QName name( childElement.tagName() );
    if ( name.localName() == QLatin1String("all") ) {
      all( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("sequence") ) {
      parseCompositor( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("choice") ) {
      parseCompositor( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("attribute") ) {
      newType.addAttribute( parseAttribute( context, childElement ) );
    } else if ( name.localName() == QLatin1String("attributeGroup") ) {
      AttributeGroup g = parseAttributeGroup( context, childElement );
      attributeGroups.append( g );
    } else if ( name.localName() == QLatin1String("anyAttribute") ) {
      addAnyAttribute( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("complexContent") ) {
      parseComplexContent( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("simpleContent") ) {
      parseSimpleContent( context, childElement, newType );
    } else if ( name.localName() == QLatin1String("annotation") ) {
      Annotation::List annotations = parseAnnotation( context, childElement );
      newType.setDocumentation( annotations.documentation() );
      newType.setAnnotations( annotations );
    }

    childElement = childElement.nextSiblingElement();
  }

  newType.setAttributeGroups( attributeGroups );

  return newType;
}
开发者ID:cjh1,项目名称:KDSoap,代码行数:49,代码来源:parser.cpp

示例15: newType

ComplexType Parser::parseComplexType( ParserContext *context,
                                      const QDomElement &complexTypeElement,
                                      const QString elementName )
{
  ComplexType newType( d->mNameSpace );

  newType.setName( complexTypeElement.attribute( "name" ) );

  if ( complexTypeElement.hasAttribute( "mixed" ) )
    newType.setContentModel( XSDType::MIXED );

  QDomElement childElement = complexTypeElement.firstChildElement();

  AttributeGroup::List attributeGroups;

  while ( !childElement.isNull() ) {
    QName name = childElement.tagName();
    if ( name.localName() == "all" ) {
      all( context, childElement, newType );
    } else if ( name.localName() == "sequence" ) {
      parseCompositor( context, childElement, newType );
    } else if ( name.localName() == "choice" ) {
      parseCompositor( context, childElement, newType );
    } else if ( name.localName() == "attribute" ) {
      newType.addAttribute( parseAttribute( context, childElement, elementName ) );
    } else if ( name.localName() == "attributeGroup" ) {
      AttributeGroup g = parseAttributeGroup( context, childElement );
      attributeGroups.append( g );
    } else if ( name.localName() == "anyAttribute" ) {
      addAnyAttribute( context, childElement, newType );
    } else if ( name.localName() == "complexContent" ) {
      parseComplexContent( context, childElement, newType );
    } else if ( name.localName() == "simpleContent" ) {
      parseSimpleContent( context, childElement, newType );
    } else if ( name.localName() == "annotation" ) {
      Annotation::List annotations = parseAnnotation( context, childElement );
      newType.setDocumentation( annotations.documentation() );
      newType.setAnnotations( annotations );
    }

    childElement = childElement.nextSiblingElement();
  }

  newType.setAttributeGroups( attributeGroups );

  return newType;
}
开发者ID:cornelius,项目名称:kode,代码行数:47,代码来源:parser.cpp


注:本文中的QName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。