Download Think v4 (a.k.a. Nuptse) Programmer`s Manual
Transcript
provides itfTypeB as i t f b
r e q u i r e s itfTypeC as i t f c
c o n t a i n s subCompX = sumCompX
c o n t a i n s subCompY = subCompDefY
b i n d s t h i s . i t f a t o subCompX . i t f a
b i n d s t h i s . i t f b t o subCompY . i t f b
b i n d s subCompY . i t f c t o t h i s . i t f c
b i n d s subCompY . i t f a t o subCompX . i t f a
}
2.3.2.2
provides
Usage Declares a provided (a.k.a server) interface in a component definition.
p r o v i d e s <i t f T y p e : DotName> a s <i t f N a m e : Name>
Description Declares a provided (a.k.a server) interface named itfName of interface type itfType.
Example The following code declares, in a component definition here.is.bar, a
provided interface named foo of interface type here.is.Foo.
i n t e r f a c e h e r e . i s . Foo {
void foo1 ( i n t a , i n t b ) ;
i n t foo2 ( char x ) ;
}
component h e r e . i s . b a r {
p r o v i d e s f o o a s h e r e . i s . Foo
}
2.3.2.3
requires
Usage Declares a required (a.k.a client) interface in a component definition.
r e q u i r e s <i t f T y p e : DotName> a s <i t f N a m e : Name>
[ ( mandatory | o p t i o n a l ) ]
Description Declares a required (a.k.a client) interface named itfName of interface
type itfType. A client interface may be declared as optional or mandatory (default
is mandatory). Any mandatory interface of a component instance must be bound to a
server interface. The build chain will complain about unbound mandatory interfaces
and will consequently fail.
10