掲示板一覧   -   トピック一覧
   EA ソースコード生成・コード生成テンプレート
     C++コード生成でクラス変数にthis->をつけるには?


フラット表示 前のトピック | 次のトピック
投稿者 トピック
未登録ゲスト
投稿日時: 2009-7-27 9:53

Re: C++コード生成でクラス変数にthis->をつけるには?

ご回答ありがとうございます。
以下のような変更で無事対応できました。

Getter
[変更前]
%elseIf opStereotype == "property get" and opTag:"attribute_name" != ""%
\treturn %opTag:"attribute_name"%;

[変更後]
%elseIf opStereotype == "property get" and opTag:"attribute_name" != ""%
\treturn this->%opTag:"attribute_name"%;

Setter
[変更前]
%elseIf opStereotype == "property set" and opTag:"attribute_name" != ""%
\t%opTag:"attribute_name"% = newVal;

[変更後]
%elseIf opStereotype == "property set" and opTag:"attribute_name" != ""%
\tthis->%opTag:"attribute_name"% = newVal;
フラット表示 前のトピック | 次のトピック

題名 投稿者 日時
   C++コード生成でクラス変数にthis->をつけるには? 未登録ゲスト 2009-7-24 11:01
     Re: C++コード生成でクラス変数にthis->をつけるには? tkouno 2009-7-24 11:11
     » Re: C++コード生成でクラス変数にthis->をつけるには? 未登録ゲスト 2009-7-27 9:53
         Re: C++コード生成でクラス変数にthis->をつけるには? tkouno 2009-7-27 10:18