file C++ designer: MAP

4 years 9 months ago - 4 years 9 months ago #3721 by mizar
I modeled a container structure for a basic C++ map generation



Generated code with C++ designer plugin (on both modelio 2.2 and 3.4)
class Directory
{
 public:
    std::map<std::string name,Files*> includedFiles;
inline Files& getIncludedFiles() 
{
//begin of modifiable zone(Cxx.Code)......T/3b547f43-8206-11e5-8733-00ffb0b6350c
return includedFiles;
//end of modifiable zone(Cxx.Code)........E/3b547f43-8206-11e5-8733-00ffb0b6350c

}; // end getIncludedFiles

Which is obviouly wrong
1) getIncludedFiles() returns includedFiles which is a std::map not a Files&
2) It's seems more usefull to have an accessor to one single element of the map not the whole map: inline Files& getIncludedFiles(std::string &name) ...


Is there an other way to model a map? or is this a bug?

thanks
Attachments:

Please Log in or Create an account to join the conversation.

4 years 9 months ago - 4 years 9 months ago #3728 by osl
Hi,

C++ Designer is a commercial module.
For commercial modules assistance, please contact the Modeliosoft technical support team .

Best regards

Go pro

Please Log in or Create an account to join the conversation.

Moderators: tmaaabcde
Time to create page: 23.475 seconds
^ Back to Top