An object that stores information about what hierarchy information is present in a file. It does not store its name; it assumes that it will be stored in a hashref where the key is the name.
Returns whether the file defines the passed class and parent.
Implementation
Since there’s only one member in the class, and it’s a hashref, the class is simply the hashref itself blessed as a class. The keys are the classes that are defined in the file, and the values are existence hashrefs of each class’ parents.
Modification Functions
New
sub New
Creates and returns a new class.
AddClass
sub AddClass #(class)
Adds a rew class to the file.
DeleteClass
sub DeleteClass #(class)
Deletes a class from the file.
AddParent
sub AddParent #
(
class,
parent
)
Adds a parent to a class.
DeleteParent
sub DeleteParent #
(
class,
parent
)
Deletes a parent from a class.
Information Functions
Classes
sub Classes
Returns an array of the classes that are defined by this file, or an empty array if none.
HasClass
sub HasClass #(class)
Returns whether the file defines the passed class.
ParentsOf
sub ParentsOf #(class)
Returns an array of the parents that are defined by the class, or an empty array if none.
HasParent
sub HasParent #
(
class,
parent
)
Returns whether the file defines the passed class and parent.