-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
210 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#region Licence | ||
|
||
// Description: SymuBiz - Symu | ||
// Website: https://symu.org | ||
// Copyright: (c) 2020 laurent morisseau | ||
// License : the program is distributed under the terms of the GNU General Public License | ||
|
||
#endregion | ||
|
||
using Symu.Common.Interfaces.Agent; | ||
|
||
namespace Symu.Repository.Networks.Roles | ||
{ | ||
public interface IAgentRole | ||
{ | ||
/// <summary> | ||
/// Unique key of the agent | ||
/// </summary> | ||
IAgentId AgentId { get; } | ||
|
||
/// <summary> | ||
/// Unique key of the group | ||
/// </summary> | ||
IAgentId GroupId { get; set; } | ||
|
||
/// <summary> | ||
/// An agent may have different role type in a group | ||
/// </summary> | ||
IRole Role { get; set; } | ||
|
||
bool IsMemberOfGroups(IAgentId teammateId, IClassId groupClassId); | ||
|
||
/// <summary> | ||
/// CHeck that there is a role of roleType for that groupId | ||
/// </summary> | ||
/// <param name="role"></param> | ||
/// <param name="groupId"></param> | ||
/// <returns></returns> | ||
bool HasRoleInGroup(IRole role, IAgentId groupId); | ||
|
||
bool HasRoleInGroup(IAgentId agentId, IRole role, IAgentId groupId); | ||
bool HasRoleInGroup(IAgentId agentId, IAgentId groupId); | ||
|
||
/// <summary> | ||
/// CHeck that there is a role of roleType for that groupId | ||
/// </summary> | ||
/// <param name="role"></param> | ||
/// <param name="agentId"></param> | ||
/// <returns></returns> | ||
bool HasRole(IAgentId agentId, IRole role); | ||
|
||
bool HasRole(IRole role); | ||
bool IsGroup(IAgentId groupId); | ||
bool IsAgent(IAgentId agentId); | ||
IAgentRole Clone(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#region Licence | ||
|
||
// Description: SymuBiz - Symu | ||
// Website: https://symu.org | ||
// Copyright: (c) 2020 laurent morisseau | ||
// License : the program is distributed under the terms of the GNU General Public License | ||
|
||
#endregion | ||
|
||
namespace Symu.Repository.Networks.Roles | ||
{ | ||
/// <summary> | ||
/// Defines the role of an agent for the RoleNetwork | ||
/// </summary> | ||
public interface IRole | ||
{ | ||
bool Equals(IRole role); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.