示例#1
0
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 );
}
示例#2
0
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 );
}
示例#3
0
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();
	}
}
示例#4
0
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 );
}
示例#5
0
void XMPPLayer::handleElement(boost::shared_ptr<Element> stanza) {
	onElement(stanza);
}
示例#6
0
void Loader::onEnumIdentifier( const location& loc, const std::string& name )
{
	CATCH_ERRORS( loc, _typeBuilder->defineIdentifier( name ) );
	onElement( name );
}
示例#7
0
void KoScriptingOdfReader::emitOnElement()
{
emit onElement();
}