SourcePro® API Reference Guide

 
List of all members | Public Member Functions
RWDBCheckConstraintList Class Reference

Holds an ordered collection of RWDBCheckConstraint instances. More...

#include <rw/db/checkconstr.h>

Public Member Functions

 RWDBCheckConstraintList ()
 
 RWDBCheckConstraintList (const RWDBCheckConstraintList &aList)
 
 ~RWDBCheckConstraintList ()
 
RWDBCheckConstraintappend (RWDBCheckConstraint *cc)
 
RWspace binaryStoreSize () const
 
void clear ()
 
void clearAndDestroy ()
 
RWDBCheckConstraintList clone () const
 
size_t entries () const
 
const RWDBCheckConstraintoperator() (size_t index) const
 
RWDBCheckConstraintoperator() (size_t index)
 
RWDBCheckConstraintListoperator= (const RWDBCheckConstraintList &aList)
 
const RWDBCheckConstraintoperator[] (size_t index) const
 
RWDBCheckConstraintoperator[] (size_t index)
 
RWDBCheckConstraintremoveAt (size_t index)
 
void restoreGuts (RWFile &f)
 
void restoreGuts (RWvistream &s)
 
void saveGuts (RWFile &f) const
 
void saveGuts (RWvostream &s) const
 

Detailed Description

RWDBCheckConstraintList is an ordered collection of RWDBCheckConstraint instances. RWDBCheckConstraintList is used by the DB Interface Module as an input/output parameter in the function RWDBTable::checkConstraints(). When the list is populated with instances of RWDBCheckConstraint, the instances are owned by the containing list. The destructor deallocates the contents of the RWDBCheckConstraintList by calling clearAndDestroy().

Synopsis
#include <rw/db/checkconstr.h>
aStatus = aTable.checkConstraints("aConstraintName", aList);

Constructor & Destructor Documentation

RWDBCheckConstraintList::RWDBCheckConstraintList ( )
inline

Constructor.

RWDBCheckConstraintList::RWDBCheckConstraintList ( const RWDBCheckConstraintList aList)
inline

Copy constructor. Makes a copy of aList.

RWDBCheckConstraintList::~RWDBCheckConstraintList ( )
inline

Destructor. This deletes the objects in the list.

Member Function Documentation

RWDBCheckConstraint* RWDBCheckConstraintList::append ( RWDBCheckConstraint cc)
inline

Adds cc to the end of the collection and returns it. If successful, self assumes ownership of cc. Returns rwnil if the insertion was unsuccessful.

RWspace RWDBCheckConstraintList::binaryStoreSize ( ) const
inline

Returns the number of bytes required to store self using the saveGuts() method.

void RWDBCheckConstraintList::clear ( )
inline

Removes all objects from the collection. Does not delete the objects themselves.

void RWDBCheckConstraintList::clearAndDestroy ( )
inline

Removes all objects from the collection and deletes them. Takes into account duplicate objects within the collection and only deletes them once. However, it does not take into account objects shared with another collection.

RWDBCheckConstraintList RWDBCheckConstraintList::clone ( ) const
inline

Returns a new list that is a deep copy of self.

size_t RWDBCheckConstraintList::entries ( ) const
inline

Returns the total number of items in the collection.

const RWDBCheckConstraint& RWDBCheckConstraintList::operator() ( size_t  index) const
inline

Returns a reference to the RWDBCheckConstraint at a position index in self. Bounds checking is enabled by defining the preprocessor directive RWBOUNDS_CHECK before including the header file rw\db\checkconstr.h. In this case, throws RWBoundsErr if the index is out of range.

RWDBCheckConstraint& RWDBCheckConstraintList::operator() ( size_t  index)
inline

Returns a reference to the RWDBCheckConstraint at a position index in self. Bounds checking is enabled by defining the preprocessor directive RWBOUNDS_CHECK before including the header file rw\db\checkconstr.h. In this case, throws RWBoundsErr if the index is out of range.

RWDBCheckConstraintList& RWDBCheckConstraintList::operator= ( const RWDBCheckConstraintList aList)
inline

Assignment operator. Destroys the contents of self and makes a copy of aList.

const RWDBCheckConstraint& RWDBCheckConstraintList::operator[] ( size_t  index) const
inline

Returns a reference to the RWDBCheckConstraint at a position index in self. Throws RWBoundsErr if the index is out of range.

RWDBCheckConstraint& RWDBCheckConstraintList::operator[] ( size_t  index)
inline

Returns a reference to the RWDBCheckConstraint at a position index in self. Throws RWBoundsErr if the index is out of range.

RWDBCheckConstraint* RWDBCheckConstraintList::removeAt ( size_t  index)
inline

Removes the oject at the position /a index in the collection and returns it. It is up to the user to delete the returned object.

void RWDBCheckConstraintList::restoreGuts ( RWFile f)
inline

Reads f, replacing the contents of self.

void RWDBCheckConstraintList::restoreGuts ( RWvistream s)
inline

Reads s, replacing the contents of self.

void RWDBCheckConstraintList::saveGuts ( RWFile f) const
inline

Writes the contents of self to f.

void RWDBCheckConstraintList::saveGuts ( RWvostream s) const
inline

Writes the contents of self to s.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.