#!/usr/bin/perl -w

#############################################################################
# Object - an object, with properties/metaproperties/links
#
# Copyright (C) 1999-2000 by Tels. All rights reserved.
#############################################################################

package Object;
use vars qw($VERSION);
$VERSION = 1.00;    # Current version of this package
require  5.005;     # requires this Perl version or later

use base Thing;
use strict;
use vars qw($AUTOLOAD);

use Property;
#use MetaProperty;

#############################################################################
# private, initialize self 

my $id = 1;

sub _init
  {
  my $self = shift;
  my $args = shift;

  $self->SUPER::_init($args); 	# use things _init to make copy and checks
  # now imply some more checks
  $self->SUPER::_default( {
    id => $id,
    time => $id,
    name => 'object_'.$id,
   } ); 
  $id++;
  return $self;
  }

#############################################################################
# public

1; 

__END__

#############################################################################

=pod

=head1 NAME

Object -- an object that contains L<Property|Property>, 
MetaProperties and/or L<Links|Link>.

=head1 SYNOPSIS

	use Object;
	use Property;
	use Link;
	use Constants::Dromed qw(CONTROL_DEVICE);

	$object = new Object ( x => 16, y => 9, z => 18,
	  contains => [ 
            Property->new( name => shape, value => 'lamp' ),
            Property->new( name => light, value => 128 ),
            Link->new( type => CONTROL_DEVICE, 
		       from => 'Kitchen::Lever', to => 'self' 
                     ),
           ],
	  name => 'MyLamp',
          );

	print $object->as_string(),"\n";

=head1 REQUIRES

perl5.005, L<Bunch|Bunch>, L<Thing|Thing>, L<Property|Property>

=head1 EXPORTS

Exports nothing.

=head1 DESCRIPTION

This represents one object, which can contain other objects, links, properties
and/or metaproperties.

=head1 FIELDS

=over 2

=item none

NRY.

=back

=head1 METHODS

=head2 *

NRY.

=head1 BUGS

None known yet.

=head1 AUTHOR

Tels http://bloodgate.com 1999-2000.

=cut

