mea1201 Posted September 9, 2011 Report Share Posted September 9, 2011 I have a transaction class family where the most super class of that hierarchy is essentially an abstract class; all other transaction types are concrete classes derived from this. I have a monitor with an analysis port declared for this abstract base class, and I'm relying on polymorphism to broadcast different transaction types as they are collected to the analysis domain. The question I have is what is the best way to handle this situation? I won't know what transaction type I have until I sample data a couple of clocks in from the start of the transaction. Then, I would like to cast the transaction from the abstract to a specific concrete class based on the type detected. The only solution I can think of is to pre-declare several transactions in the monitor, one for each concrete class plus one declared with the abstract type to hold the start of the transaction until the type can be determined. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.