External message node.
| 121 | |
| 122 | // External message node. |
| 123 | class ExtMessageNode : public MessageNode |
| 124 | { |
| 125 | public: |
| 126 | ExtMessageNode(thread_db* tdbb, MemoryPool& pool, CompilerScratch* csb, USHORT message, const Format* aFormat) |
| 127 | : MessageNode(pool), |
| 128 | format(aFormat) |
| 129 | { |
| 130 | setup(tdbb, csb, message, format->fmt_count); |
| 131 | } |
| 132 | |
| 133 | virtual USHORT setupDesc(thread_db* tdbb, CompilerScratch* csb, USHORT index, |
| 134 | dsc* desc, ItemInfo* itemInfo) |
| 135 | { |
| 136 | *desc = format->fmt_desc[index]; |
| 137 | return type_alignments[desc->dsc_dtype]; |
| 138 | } |
| 139 | |
| 140 | virtual const StmtNode* execute(thread_db* tdbb, Request* request, ExeState* exeState) const |
| 141 | { |
| 142 | if (request->req_operation == Request::req_evaluate) |
| 143 | { |
| 144 | // Clear the message. This is important for external routines. |
| 145 | UCHAR* msg = request->getImpure<UCHAR>(impureOffset); |
| 146 | memset(msg, 0, format->fmt_length); |
| 147 | } |
| 148 | |
| 149 | return MessageNode::execute(tdbb, request, exeState); |
| 150 | } |
| 151 | |
| 152 | public: |
| 153 | const Format* format; |
| 154 | }; |
| 155 | |
| 156 | // Initialize output parameters with their domains default value or NULL. |
| 157 | // Kind of blr_init_variable, but for parameters. |
no outgoing calls
no test coverage detected