"Fossies" - the Fresh Open Source Software Archive

Member "metadot/metadot/Metadot/AbstractGizmoContainer.pm" (1 Jul 2005, 2723 Bytes) of package /linux/www/old/Metadot6.4.5.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "AbstractGizmoContainer.pm" see the Fossies "Dox" file reference documentation.

    1 ###########################################################################
    2 # <LICENSEINFO>
    3 # Copyright (C) Daniel Guermeur - 1999-2001
    4 # Copyright (C) Metadot Corporation - 2001-2005
    5 #
    6 # This file is part of Metadot Portal Server software $Name: Release_6_4_5_4 $
    7 #
    8 # Metadot Portal Server software is free software; you can
    9 # redistribute it and/or modify it under the terms of the GNU General Public
   10 # License as published by the Free Software Foundation; either version 2 of
   11 # the License, or (at your option) any later version.
   12 #
   13 # Metadot Portal Server software is distributed in the hope that it
   14 # will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
   15 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
   16 # Public License for more details.
   17 #
   18 # You should have received a copy of the GNU General Public License along with
   19 # Metadot Portal Server; if not, write to the Free Software
   20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   21 #
   22 # For more information, please contact info@metadot.com.
   23 #</LICENSEINFO>
   24 ############################################################################
   25 package Metadot::AbstractGizmoContainer;
   26 
   27 
   28 
   29 # this gets a list of the container's children.
   30 sub get_children {
   31     my $self = shift;
   32     my $args = shift;
   33 
   34     die ('Abstract method');
   35 }
   36 
   37 
   38 # this accepts a list of objects and adds them to the container.
   39 sub add_children {
   40     my $self        = shift;
   41     my $child_list  = shift;
   42     my $args        = shift;
   43 
   44     die ('Abstract method');
   45 
   46 }
   47 
   48 
   49 # Must override the delete method so that the Container provides some handling of
   50 # its children.
   51 sub delete {
   52     my $self = shift;
   53 
   54     die ('Abstract method');
   55 }
   56 
   57 
   58 # Event listener for when a child is deleted
   59 sub on_child_deletion {
   60     my $self       = shift;
   61     my $child_list = shift;
   62 
   63     die ('Abstract method');
   64 }
   65 
   66 
   67 # returns true if the instance is a container of the supplied instance
   68 sub is_container_of {
   69     my $self = shift;
   70     my $child = shift;
   71 
   72     die ('Abstract method');
   73 }
   74 
   75 
   76 
   77 # returns a list of allowed child types. null or empty list means all child types are allowed
   78 sub child_types {
   79     my $self = shift;
   80 
   81     die ('Abstract method');
   82 }
   83 
   84 
   85 
   86 # returns boolean based on whether a child type is allowed by the container
   87 sub is_child_type_allowed {
   88     my $self = shift;
   89     my $child_type = shift || die("Must specify a child type");
   90 
   91     die ('Abstract method');
   92 }
   93 
   94 
   95 
   96 
   97 # for the new Gizmo3000, each child defers to its parent hierarchy
   98 # for controls.
   99 sub get_edit_controls_for_child {
  100     my $self    = shift;
  101     my $child   = shift;
  102     my $visited = shift || {};  # prevents looping
  103 
  104     die ('Abstract method');
  105 }
  106 
  107 
  108 
  109 
  110 
  111 
  112 
  113 
  114 
  115 
  116 
  117 
  118 
  119 
  120 
  121 
  122 
  123 1;