Container(3)                                                      Container(3)



NNAAMMEE
       Container -

SSYYNNOOPPSSIISS
   PPuubblliicc MMeetthhooddss
       string ccoonnttaaiinneerr__iinnffoo ()
       int qquueerryy__ccoonnttaaiinneerr ()
       string qquueerryy__pprreevveenntt__rreemmoovvee (object ob)
       string qquueerryy__pprreevveenntt__iinnsseerrtt (object ob)
       string qquueerryy__bbuullkk__mmeessssaaggee ()
       string qquueerryy__wweeiigghhtt__mmeessssaaggee ()
       int qquueerryy__wweeiigghhtt__ccaappaacciittyy ()
       int qquueerryy__bbuullkk__ccaappaacciittyy ()
       void sseett__pprreevveenntt__rreemmoovvee (string s)
       void sseett__pprreevveenntt__iinnsseerrtt (string s)
       void sseett__bbuullkk__mmeessssaaggee (string s)
       void sseett__wweeiigghhtt__mmeessssaaggee (string s)
       void sseett__bbuullkk__ccaappaacciittyy (int n)
       void sseett__wweeiigghhtt__ccaappaacciittyy (int n)
       int oonn__mmiixx ()

   PPuubblliicc AAttttrriibbuutteess
       string pprreevveenntt__rreemmoovvee
       string pprreevveenntt__iinnsseerrtt
       string bbuullkk__mmeessssaaggee
       string wweeiigghhtt__mmeessssaaggee
       int bbuullkk__ccaappaacciittyy
       int wweeiigghhtt__ccaappaacciittyy

DDEETTAAIILLEEDD DDEESSCCRRIIPPTTIIOONN
       Use this component by typing

       include <container.h>

       at the top of your source code file. You should include this for any
       object that needs to be able to hold other objects. This file is not
       sufficient for objects that need to open and close. For those objects,
       look at the Lid component.

       Definition at line 12 of file container.c.

MMEEMMBBEERR FFUUNNCCTTIIOONN DDOOCCUUMMEENNTTAATTIIOONN
   ssttrriinngg ccoonnttaaiinneerr__iinnffoo (())
       Used by the object editor.

       Definition at line 30 of file container.c.

   iinntt oonn__mmiixx (())
       A default implementation for mixing the contents of a container. Great
       for recipes.

       Definition at line 142 of file container.c.

   iinntt qquueerryy__bbuullkk__ccaappaacciittyy (())
       RReettuurrnnss::
           The capacity of this object to hold bulk, in cubic centimeters.

       Definition at line 88 of file container.c.

       References bulk_capacity.

   ssttrriinngg qquueerryy__bbuullkk__mmeessssaaggee (())
       RReettuurrnnss::
           The message given when the player attempts to insert an overly
           large object.

       Definition at line 69 of file container.c.

       References bulk_message.

   iinntt qquueerryy__ccoonnttaaiinneerr (())
       RReettuurrnnss::
           True, indicating that this object is a container.

       Definition at line 36 of file container.c.

   ssttrriinngg qquueerryy__pprreevveenntt__iinnsseerrtt ((oobbjjeecctt oobb))
       PPaarraammeetteerrss::

       _o_b     The object you are attempting to insert. Its weight and bulk
              will be checked. The simplest way to give weight and bulk to an
              object is using the IItteemm component.

       RReettuurrnnss::
           0, if it is legal to put things into this container, and a message
           explaining why insertion is illegal otherwise. If a weight or bulk
           constraint is violated, then the weight_message or bulk_message is
           returned. If prevent_insert is set, then that message is always
           returned, regardless of other constraints.

       Definition at line 62 of file container.c.

       References prevent_insert.

   ssttrriinngg qquueerryy__pprreevveenntt__rreemmoovvee ((oobbjjeecctt oobb))
       PPaarraammeetteerrss::

       _o_b     Not used by the standard implementation given here. This
              parameter is to make it easy to override this funtion in child
              objects, and write a more discerning version that allows you to
              pick and choose which objects to allow for removal.

       RReettuurrnnss::
           0, if it is okay to remove things from this container, and a
           message explaining why the object cannot be removed otherwise.

       Definition at line 48 of file container.c.

       References prevent_remove.

   iinntt qquueerryy__wweeiigghhtt__ccaappaacciittyy (())
       RReettuurrnnss::
           The capacity of this object to hold weight, in grams.

       Definition at line 82 of file container.c.

       References weight_capacity.

   ssttrriinngg qquueerryy__wweeiigghhtt__mmeessssaaggee (())
       RReettuurrnnss::
           The message given when the player attempts to insert an overly
           heavy object.

       Definition at line 76 of file container.c.

       References weight_message.

   vvooiidd sseett__bbuullkk__ccaappaacciittyy ((iinntt nn))
       PPaarraammeetteerrss::

       _n      The new bulk capacity for this object in cubic centimeters.

       Definition at line 129 of file container.c.

       References bulk_capacity.

   vvooiidd sseett__bbuullkk__mmeessssaaggee ((ssttrriinngg ss))
       PPaarraammeetteerrss::

       _s      The message to display when this container runs out of space for
              more objects, and someone tries to put one in.

       Definition at line 116 of file container.c.

       References bulk_message.

   vvooiidd sseett__pprreevveenntt__iinnsseerrtt ((ssttrriinngg ss))
       PPaarraammeetteerrss::

       _s      Pass in 0 if you want to allow insertion into this container,
              otherwise pass in the message which you wish to print when a
              player attempts an insertion.If you want to have more
              complicated insertion logic than simply checking weight/bulk and
              this flag, then you should override qquueerryy__pprreevveenntt__iinnsseerrtt(()) in an
              inheriting object.

       Definition at line 109 of file container.c.

       References prevent_insert.

   vvooiidd sseett__pprreevveenntt__rreemmoovvee ((ssttrriinngg ss))
       PPaarraammeetteerrss::

       _s      Pass in 0 if you want to allow removing objects from this
              container, and a string giving a message to print to the player
              if you wish removal to be illegal. When they try and remove
              something from the container, they will receive the message.

       Definition at line 97 of file container.c.

       References prevent_remove.

   vvooiidd sseett__wweeiigghhtt__ccaappaacciittyy ((iinntt nn))
       PPaarraammeetteerrss::

       _n      The new weight capacity for this object in grams.

       Definition at line 135 of file container.c.

       References weight_capacity.

   vvooiidd sseett__wweeiigghhtt__mmeessssaaggee ((ssttrriinngg ss))
       PPaarraammeetteerrss::

       _s      The message to display when this container runs out of weight
              capacity for more objects, and someone tries to put something
              in.

       Definition at line 123 of file container.c.

       References weight_message.

MMEEMMBBEERR DDAATTAA DDOOCCUUMMEENNTTAATTIIOONN
   iinntt bbuullkk__ccaappaacciittyy
       The maximum amount that this container may hold, in cubic centimeters.

       Definition at line 25 of file container.c.

       Referenced by query_bulk_capacity(), and set_bulk_capacity().

   ssttrriinngg bbuullkk__mmeessssaaggee
       The message given when the container's bulk limit is exceeded.

       Definition at line 16 of file container.c.

       Referenced by query_bulk_message(), and set_bulk_message().

   ssttrriinngg pprreevveenntt__iinnsseerrtt
       The message given when insertion is forbidden.

       Definition at line 16 of file container.c.

       Referenced by query_prevent_insert(), and set_prevent_insert().

   ssttrriinngg pprreevveenntt__rreemmoovvee
       The message given when removal is forbidden.

       Definition at line 16 of file container.c.

       Referenced by query_prevent_remove(), and set_prevent_remove().

   iinntt wweeiigghhtt__ccaappaacciittyy
       The maximum amount of weight that this container may carry, in grams.

       Definition at line 27 of file container.c.

       Referenced by query_weight_capacity(), and set_weight_capacity().

   ssttrriinngg wweeiigghhtt__mmeessssaaggee
       The message given when the container's weight limit is exceeded.

       Definition at line 16 of file container.c.

       Referenced by query_weight_message(), and set_weight_message().


AAUUTTHHOORR
       Generated automatically by Doxygen for Walraven from the source code.



Walraven                          8 Jan 2004                      Container(3)
