COLLECTION

Section: SOS CLASS LIBRARY (3S)
Updated: 28/10/1991
Index Return to Main Contents
man2html: unable to open or read file /usr/lib/ms/ms.acc
 

NAME

Collection<Entity> - predefined class Collection  

SYNOPSIS

#include "<SOS>/include/agg_sos.h"

class Collection<Entity> (sos_Bool based_on_equal = FALSE)
   : sos_Aggregate
{
public:
            sos_Bool  is_element (Entity);
   abstract Entity    get (sos_Cursor);
}
 

DESCRIPTION

The class Collection<Entity> provides together with is superclass sos_Aggregate an interface for traversing and manipulating Collections in an uniform way. The class Collection is an "abstract class" and no instances of Collection can be created. Instances of class sos_Cursor(3) are used to refer to the members of a Collection. (Methods that overwrite inherited methods are only described in the superclass, where they are inherited from - provided that they are semantically equivalent).

is_element (e)
returns TRUE if the Entity e is contained in the Collection, FALSE otherwise. The semantics of this function depends on the value of the based_on_equal parameter provided at creation time. If (based_on_equal == TRUE) then is_element (e) returns TRUE only if there exists a member x in this Collection for which x.equal (e) holds. If (based_on_equal == FALSE) then is_element (e) returns TRUE only if there exists a member x in this Collection for which x.identical (e) holds.
get (c)
returns the Entity at the current position of sos_Cursor c.

PRECONDITION: self.is_valid (c)

 

FILES

<SOS>/src/agg/agg.sos
SOS schema file

<SOS>/src/agg/agg_sos.h
complete schema interface

<SOS>/src/agg/agg_use.h
restricted schema interface

<SOS>/src/agg/agg_ext.h
definition of iterators (automatically included by agg_use.h)

<SOS>/src/agg/Aggregate.c
Collection implementation file

<SOS>/lib/sos.a
SOS library
 

SEE_ALSO

sos_Object(3), sos_Aggregate(3), Array(3), Bag(3), List(3), Set(3), sos_Cursor(3), agg_iterators(3)  

AUTHOR

Bernhard Schiefer, Dietmar Theobald


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE_ALSO
AUTHOR

This document was created by man2html, using the manual pages.
Time: 00:37:57 GMT, March 30, 2022