Book a Demo

Author Topic: Assignment Operator of Class  (Read 2045 times)

resolve

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Assignment Operator of Class
« on: July 15, 2009, 09:36:57 am »
I have a class "A" and I want  EA to generate a private Assignment operator for the class as it generates constructor , destructo and copy constructor.  I want to generate cod in C++.
How you do that..........? DO I need to enable any options for that.
Thanks

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Assignment Operator of Class
« Reply #1 on: July 15, 2009, 11:02:17 am »
Add a method named operator= to your class.

If you wanted to do it automatically for all classes, you would need to modify the class body template, and to check if one is already present you would need a call of EXEC_ADD_IN.  (Please search the forum for examples of using this.)