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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:49:30+00:00 2026-06-10T14:49:30+00:00

If I add attributes to an event, I know I can then use the

  • 0

If I add attributes to an event, I know I can then use the event name like a function…

BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(*someEvent*, *someAttributeList*)

someStateMachine.process_event(
   someEvent (
      valueOfSomeAttribute1, // sets the attribute value here
      valueOfSomeAttribute2))

and that inside an action I can this back by writing

evt.get_attribute(someAttribute1);  // retrieve the attribute value

Now, if I set an attribute for an entire machine, like so:

BOOST_MSM_EUML_DECLARE_STATE_MACHINE((transition_table,
                         init_ << initState,
                         Entry_Action, 
                         Exit_Action, 
                         attributes_ << someAttribute1 << someAttribute2,
                         configure_<< someConfigurationStuff ),
                         newStateMachineType)

How do I go about setting a value for someAttribute1?

Same question for states:

BOOST_MSM_EUML_STATE(
       (someEntryAction,
        someExitAction,
        attributes_ << someAttribute1,
        configure_<< someConfigurationStuff)
       ,newStateName)

How do I go about setting a value for someAttribute1?

Finally,

Is there a way to change the attributes after the object is created?

For instance, I’d like to have an attribute for the state machine, and in one of my states, remember some piece of information that I can store in the state machine. (In this case, I want to store a socket.)

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-10T14:49:32+00:00Added an answer on June 10, 2026 at 2:49 pm

    How do I go about setting a value for someAttribute1?
    You can:

    • change the reference you just got (get_attribute returns a reference): ++evt.get_attribute(someAttribute1).
    • use the functors to write the attribute in your table directly. For example, following action is possible: /++fsm_(someAttribute1)

    For states, you can do the same. And for state machines, well, ditto.
    Again, you can either use the Fsm template parameter in your actions, or the functors (fsm_, event_, etc.)

    You can find good example of all in the examples or tests (for example test/CompositeEuml.cpp or test/AnonymousEuml.cpp).

    HTH,
    Christophe

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

Sidebar

Related Questions

I would like to add custom attributes to a MySQL table which I can
I know you can add an attribute to methods in C# like this, ex1.
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
Is there a way that I can add non-static data to dataannotation attributes (either
I'm trying to add event rich snippets to my site so that Google can
In my code behind, I have - tbWhatIfBeginDate.Attributes.Add(onchange, checkDates( + tbWhatIfBeginDate.ClientID + , +
I understand that according to the HTML specification, it's invalid to add custom attributes
I'm trying to add extra HTML attributes to some select options in a dropdown
Im trying to add a div tag dynamically with some data attributes but the
I want to add the data-val-required and data-val attributes to an @html.textbox or an

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.