Autodi...::Class(3pm)

πŸ“¦
version 2.14 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble

πŸ’– Autodi...::Class πŸ’–

okay bestie, gather round β€” this is Autodia::Diagram::Class, straight out of the User Contributed Perl Documentation collection. It's the class that holds, updates and outputs the values of a diagram element of type class. Yes queen, it's giving UML realness. πŸŽ€


✨ NAME ✨

Autodia::Diagram::Class β€” the class that holds, updates and outputs the values of a diagram element of type class. That's the whole job description, and she does it flawlessly. πŸ’…


🌸 SYNOPSIS 🌸

use Autodia::Diagram::Class;

my $Class = Autodia::Diagram::Class->new;

Literally two lines and you're already living your diagram-girl era. πŸ¦‹


🫢 Description 🫢

Autodia::Diagram::Class is an object that represents the Dia UML Class element within a Dia diagram. no cap β€” that's the whole vibe. She holds, outputs, and lets you add attributes, relationships and methods. Like, she's the main character of your UML diagram and she knows it. πŸ‘‘


πŸ’… METHODS πŸ’…

πŸŽ€ Constructor πŸŽ€

my $Class = Autodia::Diagram::Class->new($name);

creates and returns a simple Autodia::Diagram::Class object, containing its name and its original position (default 0,0). Fresh out the box, standing at the origin, ready to slay. ✨


🌈 Accessors 🌈

Autodia::Diagram::Class attributes are accessed through methods, rather than directly. Not me letting you touch the internals β€” no ma'am. Each attribute is available through calling the method of its name, ie Inheritances(). The methods available are:

  • Operations
  • Attributes
  • Inheritances
  • Dependencies
  • Parent
  • has_child

The first 4 return a list, the later return a string. iykyk β€” know which one gives you a list and which one gives you a string and you're set. πŸ’–

Adding elements to the Autodia::Diagram::Class is achieved through the add_<attribute> methods, ie add_inheritance(). Add it, don't fight it. πŸ¦‹

Important lore, bestie: rather than remove an element from the diagram it is marked as redundant and replaced with a superseding element. As Autodia::Diagram::Class has highest precedence it won't be superseded, and so doesn't have a redundant() method. Superclass and Component do. She's too iconic to be replaced, periodt. πŸ‘‘

πŸ¦‹ Accessing and manipulating the Autodia::Diagram::Class πŸ¦‹

$Class->Attributes(), Inheritances(), Operations(), and Dependencies() all return a list of their respective elements. List girlies, rise. 🌸

$Class->Parent(), and has_child() return the value of the parent or child respectively if present, otherwise a false. so real for that. πŸ’€

$Class->add_attribute(), add_inheritance(), add_operation(), and add_dependancy() all add a new element of their respective types. Go off, build your whole diagram. πŸ”₯


🌟 See Also 🌟

  • Autodia::DiagramObject
  • Autodia::Diagram
  • Autodia::DiagramSuperclass
  • Autodia::DiagramInheritance

Go read the whole friend group, bestie. They all ate. 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Aaron Trevena, <aaron.trevena@gmail.com> β€” the icon, the legend, the moment. πŸ’–


Copyright (C) 2004 by Aaron Trevena

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available. free as in freedom, slay as in slay. ✨


and that's the whole page, bestie!! πŸŽ€ this was documented by the Perl doc crew, running under perl v5.36.0 and dated 2022-11-02. no cap, that's the vibe check and she passed it. mwah. πŸ’…πŸ’–

πŸ“¦ where this page comes from