void Loader::onField( const location& loc, const std::string& name, bool isReadOnly ) { IType* type = getLastDeclaredType(); if( getError() ) return; CATCH_ERRORS( loc, _typeBuilder->defineField( name, type, isReadOnly ) ); onElement( name ); }
void Loader::onMethod( const location& loc, const std::string& name ) { CATCH_ERRORS( loc, _methodBuilder = _typeBuilder->defineMethod( name ) ); IType* returnType = getLastDeclaredType(); if( getError() ) return; if( returnType != NULL ) CATCH_ERRORS( loc, _methodBuilder->defineReturnType( returnType ) ); onElement( name ); }
void Loader::onTypeSpec( const location& kLoc, TypeKind kind, const location& nLoc, const std::string& name ) { if( _typeBuilder.isValid() ) pushError( kLoc, "only one type specification is allowed per file" ); else if( name != _cslFileBaseName ) pushError( nLoc, "the name of the defined type must match its filename" ); else { _typeBuilder = createTypeBuilder( name, kind ); onElement( std::string() ); resolveImports(); } }
void Loader::onPort( const location& loc, bool isFacet, const std::string& name ) { IType* type = getLastDeclaredType(); if( getError() ) return; if( type->getKind() != TK_INTERFACE ) { pushError( loc, "an interface type was expected" ); return; } CATCH_ERRORS( loc, _typeBuilder->definePort( name, static_cast<IInterface*>( type ), isFacet ) ); onElement( name ); }
void XMPPLayer::handleElement(boost::shared_ptr<Element> stanza) { onElement(stanza); }
void Loader::onEnumIdentifier( const location& loc, const std::string& name ) { CATCH_ERRORS( loc, _typeBuilder->defineIdentifier( name ) ); onElement( name ); }
void KoScriptingOdfReader::emitOnElement() { emit onElement(); }