• inoutpin vs firing an Outpin

Document Actions
Replies: 1   Views: 3724
Up one level
You need to be a registered member to post to this forum. Register now.
Prev topic | Next topic

 • inoutpin vs firing an Outpin

Posted by edwardotis at 2004-10-07 03:38
In the example from Buildap Library Development Guide.doc,

Is there any difference between these two ways of firing outpins?

1. using inoutpin
return ("" + name + " says, Hello World";);

2. using inpin
outGreeting.fireOutPin("" + name + " says, Hello World";);

Obviously, option 2 allows you to fire/return multiple Outpins from one function/inpin.

--

"Sample inoutpin, NOTE there is no notion of inout pin as it is. * This notion used only for internal part developer’s usage"

Based on this comment, I take it that we should avoid using inoutpins?

thanks,
-Ed



------------------
/**
* Sample inpin: it uses outpin to fire out event
*
* @vscb.inpin
* id="1"
* name="hello"
*
* @param name String
*/
public void sayHello(String name) {
outGreeting.fireOutPin("" + name + " says, Hello World";);
}

/**
* Sample inoutpin, NOTE there is no notion of inout pin as it is.
* This notion used only for internal part developer’s usage.
* And it is just conbination of one inpin and one outpin
* (NOTE if outpin id equal to existing outpin id
* then the same outpin will be used, otherwise new one will be created)
*
* @vscb.inoutpin
* id="2"
* name="hello2"
* out-id="51"
* out-name="GREETING"
*
* @param name String
*/
public String sayHello2(String name) {
return ("" + name + " says, Hello World";);
}
Anonymous
Posts: n/a

 • Re: inoutpin vs firing an Outpin

Posted by amehrabyan at 2004-10-13 12:38
Actually the difference in implementation,

first implementation is faster that second,

it helps to use already existing Java code and convert or wrap it in a part,

as for second method of firing outpins, it is more natural represents idea of outpin, however it has overhead in some indirect calls compared with inoutpin

the "NOTE there is no notion of inout pin as it is. This notion used only for internal part developer’s usage"

this note says that notion of inoutpin is for "part developers" it means that part developers can use it,
the only difference that in Buildap there are concepts of inpin and outpin and there is nothing about inoutpin.

inoutpin used as shortcut for in and out pins which interrelated.

I would suggest to use inoutpin in all cases where calling inpin should generate 'one' outpin event,

in other cases use separate inpin and separate outpin
Manager
Posts: 2