using System; using AgentService.Agent.Knowledge; using AgentService.Agent.Behaviour; namespace [NameSpace] { /// /// Class [KnowledgeType]. /// public class [KnowledgeType] : Knowledge { /// /// Constructs a [KnowledgeType] object, with the given name, and the given persistence mode /// /// name of the knowledge /// peristence mode public [KnowledgeType](string name, PersistenceMode mode, [ItemReferenceType] [ItemReferenceName], [ItemValueType] [ItemValueName]) : base(name,mode); { // // TODO: Add constructor logic here // this.AddItem("[ItemReferenceName]",typeof([ItemReferenceType]),[ItemReferenceName]); this.AddItem("[ItemValueName]",typeof([ItemValueType]),[ItemValueName]); } /// /// Getter for the [ItemReferenceName] item /// /// reference to the behaviour that has obtained the lock /// the [ItemReferenceName] item public [ItemReferenceType] Get[ItemReferenceName](Behaviour lockingBehaviour) { return this["[ItemReferenceName]",lockingBehaviour] as [ItemReferenceType]; } /// /// Setter for the [ItemReferenceName] item /// /// reference to the behaviour that has obtained the lock /// the [ItemReferenceName] item public void Set[ItemRefeferenceName]([ItemReferenceType] [ItemReferenceName], Behaviour lockingBehaviour) { this["[ItemReferenceName]",lockingBehaviour] = value; } /// /// Getter for the [ItemValueName] item /// /// reference to the behaviour that has obtained the lock /// the [ItemValueName] item public [ItemValueType] Get[ItemValueName](Behaviour lockingBehaviour) { return ([ItemValueType]) this["[ItemValueName]",lockingBehaviour]; } /// /// Setter for the [ItemValueName] item /// /// reference to the behaviour that has obtained the lock /// the [ItemReferenceName] item public void Set[ItemValueName]([ItemValueType] [ItemReferenceName], Behaviour lockingBehaviour) { this["[ItemValueName]",lockingBehaviour] = value; } } }