Created
March 10, 2015 02:10
-
-
Save eventhelix/c0b7a97eb229b9090696 to your computer and use it in GitHub Desktop.
SignalProcessingCard class eliminates two dimensional array http://www.eventhelix.com/realtimemantra/object_oriented/object_design_tips_2.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The two dimensional array is replaced. We identify | |
// SignalProcesingCard as an object. This | |
// object contains 32 DSPs | |
class SignalProcessingCard | |
{ | |
DSP m_dsp[MAX_DSPS_PER_CARD]; | |
public: | |
. . . | |
}; | |
// Array of signal processing card objects, indexed by signal processing card id | |
SignalProcessingCard m_signalProcessingCard[MAX_SIGNAL_PROCESSOR_CARDS]; | |
. . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment