Hello all, I'm hoping you can give a newbie a few clarifying answers...

I'm trying to generate multiple instances of an object that uses the same Java
.class file, but I'd like to include information about each node that is
unique, such as a node address... For example, if I have the following MoML:
-----
<entity name="Node0" class="ptolemy.domains.pn.myNode">
    <property name="nodeNumber" value="0" class="ptolemy.data.expr.Parameter"/>
</entity>

<entity name="Node1" class="ptolemy.domains.pn.myNode">
    <property name="nodeNumber" value="1" class="ptolemy.data.expr.Parameter"/>
</entity>
------

Will each instance of the myNode class have a private parameter named
"nodeNumber" What if I have 1000 nodes? Would I need to have a unique
property/parameter name for each?

Would the myNode class contain code such as

     private Parameter nodeNumber;


Also, how do I convert the Parameter to an int so I can manipulate the value?

Can I just omit the    class="ptolemy.data.expr.Parameter"   from the property
definition and just use the follwing MoML

   <property name="nodeNumber" value="0">

and in myNode.class have

   private int nodeNumber;

Thanks for putting up with this newbie question,


-Phil


__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to