From: Colin P. A. <co...@co...> - 2008-01-25 14:23:08
|
Classes RX_PCRE_MATCHER and RX_PCRE_BYTE_CODE_CONSTANTS violate the single choice principle as they both contain giant inspect statements on the operation code. And the list of operation codes is defined in yet a third class (RX_PCRE_BYTE_CODE_CONSTANTS). The pure OO way would be to have a class for the concept of the machine operation and descendant class for each operation. But as these classes can't be expanded, there is cost associated with this, compared to using a 32-bit integer to represent instructions (which is a resonable model of a 32-bit microprocessor instruction - that is - its the model an assembler programmer has). I have to decide which way to go for the Unicode engine I am working on. Any opinions one way or the other? -- Colin Adams Preston Lancashire |