Internal message node.
| 67 | { |
| 68 | // Internal message node. |
| 69 | class IntMessageNode : public MessageNode |
| 70 | { |
| 71 | public: |
| 72 | IntMessageNode(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, USHORT message, |
| 73 | Array<NestConst<Parameter> >& aParameters, const Format* aFormat) |
| 74 | : MessageNode(pool), |
| 75 | parameters(aParameters), |
| 76 | format(aFormat) |
| 77 | { |
| 78 | setup(tdbb, csb, message, format->fmt_count); |
| 79 | } |
| 80 | |
| 81 | virtual USHORT setupDesc(thread_db* tdbb, CompilerScratch* csb, USHORT index, |
| 82 | dsc* desc, ItemInfo* itemInfo) |
| 83 | { |
| 84 | *desc = format->fmt_desc[index]; |
| 85 | |
| 86 | if (index % 2 == 0 && index / 2u < parameters.getCount()) |
| 87 | { |
| 88 | const Parameter* param = parameters[index / 2]; |
| 89 | |
| 90 | if (param->prm_mechanism != prm_mech_type_of && |
| 91 | !fb_utils::implicit_domain(param->prm_field_source.c_str())) |
| 92 | { |
| 93 | MetaNamePair namePair(param->prm_field_source, ""); |
| 94 | |
| 95 | FieldInfo fieldInfo; |
| 96 | bool exist = csb->csb_map_field_info.get(namePair, fieldInfo); |
| 97 | MET_get_domain(tdbb, csb->csb_pool, param->prm_field_source, desc, |
| 98 | (exist ? NULL : &fieldInfo)); |
| 99 | |
| 100 | if (!exist) |
| 101 | csb->csb_map_field_info.put(namePair, fieldInfo); |
| 102 | |
| 103 | itemInfo->field = namePair; |
| 104 | itemInfo->nullable = fieldInfo.nullable; |
| 105 | itemInfo->fullDomain = true; |
| 106 | } |
| 107 | |
| 108 | itemInfo->name = param->prm_name; |
| 109 | |
| 110 | if (!param->prm_nullable) |
| 111 | itemInfo->nullable = false; |
| 112 | } |
| 113 | |
| 114 | return type_alignments[desc->dsc_dtype]; |
| 115 | } |
| 116 | |
| 117 | public: |
| 118 | Array<NestConst<Parameter> >& parameters; |
| 119 | const Format* format; |
| 120 | }; |
| 121 | |
| 122 | // External message node. |
| 123 | class ExtMessageNode : public MessageNode |
no outgoing calls
no test coverage detected