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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:18:40+00:00 2026-06-14T18:18:40+00:00

Every reference on google only shows easy examples, I have this case on a

  • 0

Every reference on google only shows easy examples, I have this case on a code:

#define XHANDLER(A,B,H) X_TO_BUS_HANDLER(A,B,H) X_FROM_BUS_HANDLER(A,B,H)

namespace{
   X_TO_BUS_HANDLER( some::SomeClassX,
                     bus::SomeBus,
                     foo::SomeHandler );

Does any one know how this define works? One pattern and two token-lists? References please.

I egrepED the code but only found X_TO_BUS_HANDLER been used.

  • 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-14T18:18:41+00:00Added an answer on June 14, 2026 at 6:18 pm

    The C/C++ preprocessor will replace the pattern for everything that is written in the same line. In your case it looks as if the two token after that pattern are themselves macros, so they will get expanded as well.

    Some example:

    #define F(x, y) x f(y yParam);
    #define G(x, y) y g(x xParam);
    #define FG(x, y) F(x, y) G(x, y);
    
    FG(int, double)
    
    //this is the same as:
    int f(double yParam);
    double g(int xParam);
    

    In your case I guess the two defines X_FROM_… and X_TO_… create some functions or classes that are handlers for passing an X from or to some bus, respectively. The XHANDLER macro will create handlers for both directions.

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

Sidebar

Related Questions

Can not resolve a multiname reference unambiguously A search for this string in Google
this code checks if i have mail from gmail, then sends m over serial
I have JS code with google maps api. When I click on a marker
volatile is to tell the compiler not to optimize the reference, so that every
My doc strings have references to other python classes that I've defined. Every time
Every second line is coloured on the table in the view. I have the
I've seen this format function referenced on several sites, but none of them have
How can I cache a Reference Property in Google App Engine? For example, let's
I'm sure this question has been asked and answered before, but my Google-fu is
I am trying to use this feature (Google Analytics) in my app and can't

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.