Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add easy access to information in an Event occurrence #168

Closed
gbasso opened this issue Jul 21, 2014 · 2 comments
Closed

Add easy access to information in an Event occurrence #168

gbasso opened this issue Jul 21, 2014 · 2 comments
Assignees
Milestone

Comments

@gbasso
Copy link

gbasso commented Jul 21, 2014

For example, a function to compare the sender of the event and the receiver:

on MyEvent [ occurrence.source.isMe(this.ID) ]

or an access to the space where the event is emit:

on MyEvent [ occurrence.space == this.defaultSpace ] // the ID or the space ?
@gallandarakhneorg
Copy link
Member

The following functions could be added:

  • Agent::isFromMe(Event event)
  • Agent::isMe(UUID agentID)
  • Agent::isMe(Address agentAddress)
  • Event::isFrom(Address agentAddress)
  • Event::isFrom(UUID agentID)
  • DefaultContextInteractions::isDefaultSpace(Space space)
  • DefaultContextInteractions::isDefaultSpace(UUID spaceID)
  • DefaultContextInteractions::isInDefaultSpace(Event event)
  • DefaultContextInteractions::isDefaultContext(AgentContext context)
  • DefaultContextInteractions::isDefaultContext(UUID contextID)
  • InnerContextInteractions::isInnerDefaultSpace(Space space)
  • InnerContextInteractions::isInnerDefaultSpace(UUID spaceID)
  • InnerContextInteractions::isInInnerDefaultSpace(Event event)
  • ExternalContextInteractions::isInSpace(Event event, Space space)
  • ExternalContextInteractions::isInSpace(Event event, UUID contextID, UUID spaceID)
  • ExternalContextInteractions::isInDefaultSpace(Event event, UUID spaceID)

Note that all these functions may benefit of the extension method syntax.

@gallandarakhneorg
Copy link
Member

The Agent's functions are added in the commit 37f7eff.

@gallandarakhneorg gallandarakhneorg self-assigned this Feb 13, 2015
gallandarakhneorg added a commit that referenced this issue Feb 16, 2015
see #168

Signed-off-by: Stéphane Galland <galland@arakhne.org>
gallandarakhneorg added a commit that referenced this issue Feb 16, 2015
see #168

Signed-off-by: Stéphane Galland <galland@arakhne.org>
gallandarakhneorg added a commit to janus-project/janusproject that referenced this issue Feb 16, 2015
see sarl/sarl#168

Signed-off-by: Stéphane Galland <galland@arakhne.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants