18 using System.Collections.Generic;
23 using ErrorManagement;
45 private List<Modifier> modifiers;
50 private List<string> baseClass;
60 get {
return this.members.Count; }
67 get {
return this.modifiers; }
74 get {
return this.baseClass; }
92 this.modifiers = mods;
93 this.baseClass = bases;
106 this.members.Insert(0, f);
111 #region GetMemberElement()
119 if (index >= 0 && index < this.
members.Count)
120 return this.members[index];
129 #region RemoveMemberElement()
136 if (index >= 0 && index < this.
members.Count)
137 this.members.RemoveAt(index);
154 return v.Visit(
this, o);
int MemberCount
Gets the number of members
List< Modifier > Modifiers
Gets the list of modifiers
void AddNewField(FieldDeclaration f)
Adds a new field declaration.
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
TypeDefinition(SingleIdentifierExpression id, List< Modifier > mods, List< string > bases, List< Declaration > decls, Location location)
Constructor of TypeDefinition.
List< Declaration > members
Stores the members of the class.
List< string > BaseClass
Gets the list of base class
Encapsulates a identifier expression of our programming language.
Declaration GetMemberElement(int index)
Gets the element stored in the specified index.
Encapsulates a declaration of a concrete type.
override Object Accept(Visitor v, Object o)
Accept method of a concrete visitor.
Encapsulates a declaration.
Represents the error occurred when the argument value is out of range.
Location location
Location: Encapsulates in one object the line, column and filename
Encapsulates a definition of a concrete class or interface.
Encapsulates a declaration of a concrete field.
string Identifier
Gets the name associated to the declaration
void RemoveMemberElement(int index)
Deletes the element stored in the specified index.