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 7544865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:47:03+00:00 2026-05-30T08:47:03+00:00

Actually I need to know how this line is getting executed. Example: Browser(InternetExplorer).Page(Stackoverflow).WebElement(textbox).set user

  • 0

Actually I need to know how this line is getting executed.

Example:

Browser("InternetExplorer").Page("Stackoverflow").WebElement("textbox").set "user"

The above lines executes like setting browser to Internet Explorer and finding page “stackoverflow” in it and then finding webelement “textbox” in it and then sets it values to “user”. in this way the operation is done.

I want to know how this sequence call are be done. I don’t want how browser is set to Internet Explorer and so on.

I need to execute a simple statement like

Fun(“add”).values(“2,3”).compute

I need the above line to execute by calling “add” function then values “2,3” are passed as parameter then “compute” add it and the final result should “5” be return.

How to do this? Whether we have to use different class for “Fun” and “values” or we need to implement them as “functions” of same class.

How to process sequence call ?

  • 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-05-30T08:47:04+00:00Added an answer on May 30, 2026 at 8:47 am

    It is enough to return a reference to an existing object to achieve this effect:

    class Operator
    {
    public:
        Operator(const string& opAsStr)
        {
            ...
        }
    
        Operator& Values(const string& operands)
        {
            ....
            return *this;
        }
    
        int Compute() // Compute must be a function, no properties in C++
        {
            ...
        }
    };
    
    // Usable like this
    Operator("Add").Values("2,3").Compute()
    

    By defining more function returning *this you can chain many calls. Note that you could return a value (i.e. Operator instead of a reference, or a const reference depending on your use cases).
    You can also return a reference (or value) to an object of another class:

    class A
    {
    public:
        void DoSomething()
        {
            ....
        }
    };
    
    class B
    {
    public:
        A MakeA()
        {
             return A();
        }
    };
    
    B().MakeA().DoSomething();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say, hypothetically (read: I don't think I actually need this, but I am
I'm getting pretty big input string into my method, but what I actually need
I need to getting the client ip address using javascript.Actually,our connection provider ip is
I need to check whether a page is being redirected or not without actually
I know it can be achieved by command line but I need to pass
I need a help from ur side. Actually I need to call a method
I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using
Actually We are doing thesis work where we need to make 10 voip phones
I need a table where rows are actually 2 rows tables, a nested table
I need to get just the first item (actually, just the first key) off

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.