template<class RT, class CT, int DS>
struct CombineDomain< RT, CT, DS >
CombineDomain is a utility class used only by the 'fill*' methods of NewDomain2 ...
NewDomain7. It is templated on the following params:
- RT : the return domain type, which is the domain we are constructing
- CT : the domain type being combined with RT
- DS : the domain index at which we should start adding CT into RT CombineDomain takes a domain object of type CT, and combines it into an existing domain object RT. The domain RT is then changed. DS provides the 'beginning' index at which CT should be added, for example if RT is a dim-5 domain, CT a dim-2 domain, and DS is 1, then RT[1] is set to be CT[0], and RT[2] is set to be CT[1].
For "slice" rules (used by fillSlice methods), a separate CombineSliceDomain class is available. The complication here is that SliceDomain's store two pieces of information (the "total" domain, and the "slice" domain), instead of just one (the domain). To store these values, CombineSliceDomain takes a slightly different set of parameters:
- RT: the return domain type, which is the domain we are constructing
- CT: the domain type being combined with RT
- DS: the "total" domain index at which we should start adding CT into RT
- SliceDS: the "slice" domain index at which we should start adding CT into RT
- incl: if this is false, then either RT is not a SliceDomain, or the type CT is a "singleValued" domain which should not be included in the slice domain. If this is true, then RT is a SliceDomain, and CT is a domain such as Interval or Range that should be included in both the total domain and the slice domain. To do this, the class is partially specialized to the case where incl=true. Those specializations fill in CT into both the total domain of RT and the slice domain of RT.
- wildcard: if this is true, the domain being combined, of type CT, is a wildcard domain, so the user must provide a "reference" domain with which to combine. The wildcard takes the reference domain and copies or modifies it based on the type of wildcard. if this is false, the CT domain is not a wildcard, and the user- supplied reference domain is ignored.