| 40 | } |
| 41 | |
| 42 | void BuildOps(OpRcPtrVec & ops, |
| 43 | const Config & config, |
| 44 | const ConstContextRcPtr & context, |
| 45 | const ConstTransformRcPtr & transform, |
| 46 | TransformDirection dir) |
| 47 | { |
| 48 | // A null transform is valid, and corresponds to a no-op. |
| 49 | if(!transform) |
| 50 | return; |
| 51 | |
| 52 | if(ConstAllocationTransformRcPtr allocationTransform = \ |
| 53 | DynamicPtrCast<const AllocationTransform>(transform)) |
| 54 | { |
| 55 | BuildAllocationOp(ops, *allocationTransform, dir); |
| 56 | } |
| 57 | else if(ConstBuiltinTransformRcPtr builtInTransform = \ |
| 58 | DynamicPtrCast<const BuiltinTransform>(transform)) |
| 59 | { |
| 60 | BuildBuiltinOps(ops, *builtInTransform, dir); |
| 61 | } |
| 62 | else if(ConstCDLTransformRcPtr cdlTransform = \ |
| 63 | DynamicPtrCast<const CDLTransform>(transform)) |
| 64 | { |
| 65 | BuildCDLOp(ops, config, *cdlTransform, dir); |
| 66 | } |
| 67 | else if(ConstColorSpaceTransformRcPtr colorSpaceTransform = \ |
| 68 | DynamicPtrCast<const ColorSpaceTransform>(transform)) |
| 69 | { |
| 70 | BuildColorSpaceOps(ops, config, context, *colorSpaceTransform, dir); |
| 71 | } |
| 72 | else if(ConstDisplayViewTransformRcPtr displayViewTransform = \ |
| 73 | DynamicPtrCast<const DisplayViewTransform>(transform)) |
| 74 | { |
| 75 | BuildDisplayOps(ops, config, context, *displayViewTransform, dir); |
| 76 | } |
| 77 | else if(ConstExponentTransformRcPtr exponentTransform = \ |
| 78 | DynamicPtrCast<const ExponentTransform>(transform)) |
| 79 | { |
| 80 | BuildExponentOp(ops, config, *exponentTransform, dir); |
| 81 | } |
| 82 | else if(ConstExponentWithLinearTransformRcPtr expWithLinearTransform = \ |
| 83 | DynamicPtrCast<const ExponentWithLinearTransform>(transform)) |
| 84 | { |
| 85 | BuildExponentWithLinearOp(ops, *expWithLinearTransform, dir); |
| 86 | } |
| 87 | else if (ConstExposureContrastTransformRcPtr ecTransform = \ |
| 88 | DynamicPtrCast<const ExposureContrastTransform>(transform)) |
| 89 | { |
| 90 | BuildExposureContrastOp(ops, *ecTransform, dir); |
| 91 | } |
| 92 | else if(ConstFileTransformRcPtr fileTransform = \ |
| 93 | DynamicPtrCast<const FileTransform>(transform)) |
| 94 | { |
| 95 | BuildFileTransformOps(ops, config, context, *fileTransform, dir); |
| 96 | } |
| 97 | else if (ConstFixedFunctionTransformRcPtr fixedFunctionTransform = \ |
| 98 | DynamicPtrCast<const FixedFunctionTransform>(transform)) |
| 99 | { |