From: 박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Tue, 8 Jan 2019 23:41:56 +0000 (+0900) Subject: [enco] Add comments to subst method (#2775) X-Git-Tag: nncc_backup~1011 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dc11ac654d8b3b5f6686864e8443c6fedfe6c68;p=platform%2Fcore%2Fml%2Fnnfw.git [enco] Add comments to subst method (#2775) * [enco] Add comments to subst method This will add explanation comment of subst() method Signed-off-by: SaeHie Park * some changes and example code * use word USER * Apply suggested comment * fix typos * use word Consumer --- diff --git a/contrib/enco/core/src/IRUtils.cpp b/contrib/enco/core/src/IRUtils.cpp index 1d322db..59f6b0d 100644 --- a/contrib/enco/core/src/IRUtils.cpp +++ b/contrib/enco/core/src/IRUtils.cpp @@ -21,6 +21,20 @@ namespace enco { +/** + * @brief Substitute all the USE occurrences of an object with another object + * @param from Object to be replaced + * @param into Object to be used instead + * NOTE This maybe used when something like -- 'from' will be removed so we need + * to replace object Consumers that use 'from' to 'into' + * EXAMPLE + * { + * subst(child, bigone); + * m->entity()->object()->destroy(child); + * } + * This code will change all the Consumers that use 'child' to 'bigone' and + * destroy the 'child' object. + */ void subst(coco::Object *from, coco::Object *into) { assert(from != into);