.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "MAGE::Base 3pm" .TH MAGE::Base 3pm "2018-10-24" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::MAGE::Base \- generic base class .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::MAGE::Base; \& \& # create an empty instance \& my $obj = Bio::MAGE::Base\->new(); \& \& # create an instance and populate with data \& my $obj = Bio::MAGE::Base\->new(attr1=>$val1, attr2=>$val2); \& \& # copy an existing instance \& my $obj_copy = $obj\->new(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The base class for all other Bio::MAGE classes .SH "CLASS METHODS" .IX Header "CLASS METHODS" The following methods can all be called without first having an instance of the class via the Namespace::Class\->\fImethodname()\fR syntax, i.e. the class name \fBmust\fR be given as an argument to the method. .ie n .IP "$obj = class\->new(%params)" 4 .el .IP "\f(CW$obj\fR = class\->new(%params)" 4 .IX Item "$obj = class->new(%params)" The \f(CW\*(C`new()\*(C'\fR method is the class constructor. .Sp \&\fBParameters\fR: if given a list of name/value parameters the corresponding slots, attributes, or associations will have their initial values set by the constructor. .Sp \&\fBReturn value\fR: It returns a reference to an object of the class. .Sp \&\fBSide effects\fR: It invokes the \f(CW\*(C`initialize()\*(C'\fR method if it is defined by the class. .PP The following methods can all be called with either the Namespace::Class\->\fImethodname()\fR and \f(CW$obj\fR\->\fImethodname()\fR syntaxes. .ie n .IP "@names = \fIget_slot_names()\fR" 4 .el .IP "\f(CW@names\fR = \fIget_slot_names()\fR" 4 .IX Item "@names = get_slot_names()" The \f(CW\*(C`get_slot_names()\*(C'\fR method is used to retrieve the name of all slots defined for a given object. .Sp \&\fB\s-1NOTE\s0\fR: the list of names does not include attribute or association names. .Sp \&\fBReturn value\fR: A list of the names of all slots defined for this class. .Sp \&\fBSide effects\fR: none .ie n .IP "@name_list = \fIget_attribute_names()\fR" 4 .el .IP "\f(CW@name_list\fR = \fIget_attribute_names()\fR" 4 .IX Item "@name_list = get_attribute_names()" returns the list of attribute data members for this class. .ie n .IP "@name_list = \fIget_association_names()\fR" 4 .el .IP "\f(CW@name_list\fR = \fIget_association_names()\fR" 4 .IX Item "@name_list = get_association_names()" returns the list of association data members for this class. .ie n .IP "@class_list = \fIget_superclasses()\fR" 4 .el .IP "\f(CW@class_list\fR = \fIget_superclasses()\fR" 4 .IX Item "@class_list = get_superclasses()" returns the list of superclasses for this class. .ie n .IP "@class_list = \fIget_subclasses()\fR" 4 .el .IP "\f(CW@class_list\fR = \fIget_subclasses()\fR" 4 .IX Item "@class_list = get_subclasses()" returns the list of subclasses for this class. .ie n .IP "$name = \fIclass_name()\fR" 4 .el .IP "\f(CW$name\fR = \fIclass_name()\fR" 4 .IX Item "$name = class_name()" Returns the full class name for this class. .ie n .IP "$package_name = \fIpackage_name()\fR" 4 .el .IP "\f(CW$package_name\fR = \fIpackage_name()\fR" 4 .IX Item "$package_name = package_name()" Returns the base package name (i.e. no 'namespace::') of the package that contains this class. .ie n .IP "%assns = \fIassociations()\fR" 4 .el .IP "\f(CW%assns\fR = \fIassociations()\fR" 4 .IX Item "%assns = associations()" returns the association meta-information in a hash where the keys are the association names and the values are \f(CW\*(C`Association\*(C'\fR objects that provide the meta-information for the association. .SH "INSTANCE METHODS" .IX Header "INSTANCE METHODS" These methods must be invoked with the direct object syntax using an existing instance, i.e. \f(CW$object\fR\->\fImethod_name()\fR. .ie n .IP "$obj_copy = $obj\->\fInew()\fR" 4 .el .IP "\f(CW$obj_copy\fR = \f(CW$obj\fR\->\fInew()\fR" 4 .IX Item "$obj_copy = $obj->new()" When invoked with an existing object reference and not a class name, the \f(CW\*(C`new()\*(C'\fR method acts as a copy constructor \- with the new object's initial values set to be those of the existing object. .Sp \&\fBParameters\fR: No input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied. .Sp \&\fBReturn value\fR: It returns a reference to an object of the class. .Sp \&\fBSide effects\fR: It invokes the \f(CW\*(C`initialize()\*(C'\fR method if it is defined by the class. .ie n .IP "$obj\->set_slots(%parameters)" 4 .el .IP "\f(CW$obj\fR\->set_slots(%parameters)" 4 .IX Item "$obj->set_slots(%parameters)" .PD 0 .ie n .IP "$obj\->set_slots(\e@name_list, \e@value_list)" 4 .el .IP "\f(CW$obj\fR\->set_slots(\e@name_list, \e@value_list)" 4 .IX Item "$obj->set_slots(@name_list, @value_list)" .PD The \f(CW\*(C`set_slots()\*(C'\fR method is used to set a number of slots at the same time. It has two different invocation methods. The first takes a named parameter list, and the second takes two array references. .Sp \&\fBReturn value\fR: none .Sp \&\fBSide effects\fR: will call \f(CW\*(C`croak()\*(C'\fR if a slot_name is used that the class does not define. .ie n .IP "$obj\->get_slots(@name_list)" 4 .el .IP "\f(CW$obj\fR\->get_slots(@name_list)" 4 .IX Item "$obj->get_slots(@name_list)" The \f(CW\*(C`get_slots()\*(C'\fR method is used to get the values of a number of slots at the same time. .Sp \&\fBReturn value\fR: a list of instance objects .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $obj\->set_slot($name,$val)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->set_slot($name,$val)" 4 .IX Item "$val = $obj->set_slot($name,$val)" The \f(CW\*(C`set_slot()\*(C'\fR method sets the slot \f(CW$name\fR to the value \f(CW$val\fR .Sp \&\fBReturn value\fR: the new value of the slot, i.e. \f(CW$val\fR .Sp \&\fBSide effects\fR: none .ie n .IP "$val = $obj\->get_slot($name)" 4 .el .IP "\f(CW$val\fR = \f(CW$obj\fR\->get_slot($name)" 4 .IX Item "$val = $obj->get_slot($name)" The \f(CW\*(C`get_slot()\*(C'\fR method is used to get the values of a number of slots at the same time. .Sp \&\fBReturn value\fR: a single slot value, or undef if the slot has not been initialized. .Sp \&\fBSide effects\fR: none .IP "throw" 4 .IX Item "throw" .Vb 6 \& Title : throw \& Usage : \& Function: \& Example : \& Returns : \& Args : .Ve .IP "throw_not_implemented" 4 .IX Item "throw_not_implemented" .Vb 6 \& Title : throw_not_implemented \& Usage : \& Function: \& Example : \& Returns : \& Args : .Ve .SH "BUGS" .IX Header "BUGS" Please send bug reports to the project mailing list: () .SH "AUTHOR" .IX Header "AUTHOR" .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1).