Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8567727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:56:51+00:00 2026-06-11T17:56:51+00:00

I want to know creating an abstract class with multiple pure virtual methods in

  • 0

I want to know creating an abstract class with multiple pure virtual methods in c++ is good or not?

For example in some situations like implementing session initiation protocol’s dialogs we found that it can be implemented using bridge pattern. But having abstract base class for common operations lead to have a very large abstract class. Now from performance view what is the effect of using and implementing such class?

Consider we have different dialogs that each one have it’s own implementation.
(ex: InviteDialog,RegisterDialog,InfoDialog,…)

Applying bridge pattern :

class IIDialog{
public:
/*there are multiple pure virtual methodes at least 15*/
virtual int32_t SendResponse(ISipMessage* response) = 0;
protected:
/*there are multiple methods that use pure virtual methods*/
int32_t Send_Response(){retun SendResponse(response);}
}

class IInviteDialog : public IIDialog
{
/*Implemet virtual methods*/
}

class IRegisterationDialog : public IIDialog
{
/*implement virtual methode*/
}

other parts of implementation ignored(real implementations and abstracts for implementation that is used by above classes)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:56:52+00:00Added an answer on June 11, 2026 at 5:56 pm

    With most modern C++ compilers you can assume that the performance overhead when constructing an object does not depend on the number of virtual methods.

    And when actually calling the methods I would expect the overhead not being larger than that of any alternative implementation method.

    And if these function calls do “complicated” things like network operations then you don’t really need to bother about such micro-optimisations anyhow, it will be completely irrelevant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Want to know ways to store OBJECTS of a Class in some persistent storage.
Im creating an application and i want to know whether or not the browser
Im creating a news-like app and I want to know is is possible to
I am creating a CMS and want to know if its possible to download
I want to know what is the best solution for creating ASP.NET HTTP Handler
i want know how i can manage multiple twitter account on iOS in my
want to know why String behaves like value type while using ==. String s1
I want to know what is the safiest chmode for creating user folders and
I am creating one Java project. I want to know how I can create
I'm creating a login system in PHP, and I want to know how to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.