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