From: abraham t. <ti...@ta...> - 2003-08-12 15:12:08
|
Like this one: (RXC[]) group.getAll("RXC") yes, this one is better, pure for sure: RXC[] getAllRXC(); But an inbetween solution _might_ be: group.getAll(RXC.class); this would allow some overloading, and help out in certain cases where there are DEFINITELY supposed to be or DEFINITELY NOT supposed to be certain segments in a type of message. -----Original Message----- From: hl7...@li... [mailto:hl7...@li...] On Behalf Of Tripp, Bryan Sent: Tuesday, August 12, 2003 9:47 AM To: 'Phillip Tornroth'; hl7...@li... Subject: RE: [HAPI-devel] message segment counts Hi Phill, > construct.. I have an object of type > RDE_O11_ORCRXONTERXRRXCNTERXERXRRXCOBXNTECTI... crazy. Yes, the brute-force method of avoiding name collisions. This is how group names were originally defined in the XML encoding. For example the corresponding DTD element for this group was: <!ENTITY % RDE_O01.ORCRXONTERXRRXCNTERXERXRRXCOBXNTECTI.CONTENT (ORC,RDE_O01.RXONTERXRRXCNTE?,RXE,RXR+,RXC*,RDE_O01.OBXNTE+,CTI*)"> More recently HL7 has been coming up with nice, short group names, so this won't last forever. > what's my mechanism for iterating them? I would do this: (RXC[]) group.getAll("RXC"); ... but come to think of it this doesn't test your assumptions about message structure at compile time. Maybe there should also be: RXC[] getAllRXC(); ... or: int getNumRXC(); What does everyone think? Thanks, Bryan This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel |