This refactoring option implements stub-functions for all pure virtuals in one or all base classes. Here’s an example.
class Person { public: virtual std::string GetName() = 0; virtual void SetName(std::string) = 0; }; class DbEntity { public: virtual int GetId() = 0; virtual void SetId(int) = 0; }; class Employee : Person, DbEntity { public: Employee(); };
If you right click on a specific base class, you’ll get an option to just implement pure virtuals for that class. If you right click on the derived class name, you’ll get the option to implement all pure virtuals for all base types.
This is what you’ll end up with (in the header).
class Employee : Person, DbEntity { public: Employee(); // Inherited via Person virtual std::string GetName() override; virtual void SetName(std::string) override; // Inherited via DbEntity virtual int GetId() override; virtual void SetId(int) override; };
Corresponding definitions (empty ones) will be generated in the cpp file.
Hi Nish,
I need your help to implement one Video Server which will boradcast video feed on RTSP using c++.
Kindly provide me your contact detail for this.
Thank You,
Maulik Dusara