SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWDBUniqueConstraintList Class Reference

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

#include <rw/db/uniqueconstr.h>

Public Member Functions

 RWDBUniqueConstraintList ()
 
 RWDBUniqueConstraintList (const RWDBUniqueConstraintList &aList)
 
 ~RWDBUniqueConstraintList ()
 
RWDBUniqueConstraintappend (RWDBUniqueConstraint *uc)
 
RWspace binaryStoreSize () const
 
void clear ()
 
void clearAndDestroy ()
 
RWDBUniqueConstraintList clone () const
 
size_t entries () const
 
RWDBUniqueConstraintoperator() (size_t index)
 
const RWDBUniqueConstraintoperator() (size_t index) const
 
RWDBUniqueConstraintListoperator= (const RWDBUniqueConstraintList &aList)
 
RWDBUniqueConstraintoperator[] (size_t index)
 
const RWDBUniqueConstraintoperator[] (size_t index) const
 
RWDBUniqueConstraintremoveAt (size_t index)
 
void restoreGuts (RWFile &f)
 
void restoreGuts (RWvistream &s)
 
void saveGuts (RWFile &f) const
 
void saveGuts (RWvostream &s) const
 

Detailed Description

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

Synopsis
#include <rw/db/uniqueconstr.h>
aStatus = aTable.uniqueConstraints("aConstraintName", aList);
Holds an ordered collection of RWDBUniqueConstraint instances.
Definition uniqueconstr.h:277

Constructor & Destructor Documentation

◆ RWDBUniqueConstraintList() [1/2]

RWDBUniqueConstraintList::RWDBUniqueConstraintList ( )
inline

Constructor.

◆ RWDBUniqueConstraintList() [2/2]

RWDBUniqueConstraintList::RWDBUniqueConstraintList ( const RWDBUniqueConstraintList & aList)
inline

Copy constructor. Makes a copy aList.

◆ ~RWDBUniqueConstraintList()

RWDBUniqueConstraintList::~RWDBUniqueConstraintList ( )
inline

Destructor. This deletes the objects in the list.

Member Function Documentation

◆ append()

RWDBUniqueConstraint * RWDBUniqueConstraintList::append ( RWDBUniqueConstraint * uc)
inline

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

◆ binaryStoreSize()

RWspace RWDBUniqueConstraintList::binaryStoreSize ( ) const
inline

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

◆ clear()

void RWDBUniqueConstraintList::clear ( )
inline

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

◆ clearAndDestroy()

void RWDBUniqueConstraintList::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.

◆ clone()

RWDBUniqueConstraintList RWDBUniqueConstraintList::clone ( ) const
inline

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

◆ entries()

size_t RWDBUniqueConstraintList::entries ( ) const
inline

Returns the total number of items in the collection.

◆ operator()() [1/2]

RWDBUniqueConstraint & RWDBUniqueConstraintList::operator() ( size_t index)
inline

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

◆ operator()() [2/2]

const RWDBUniqueConstraint & RWDBUniqueConstraintList::operator() ( size_t index) const
inline

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

◆ operator=()

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

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

◆ operator[]() [1/2]

RWDBUniqueConstraint & RWDBUniqueConstraintList::operator[] ( size_t index)
inline

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

◆ operator[]() [2/2]

const RWDBUniqueConstraint & RWDBUniqueConstraintList::operator[] ( size_t index) const
inline

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

◆ removeAt()

RWDBUniqueConstraint * RWDBUniqueConstraintList::removeAt ( size_t index)
inline

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

◆ restoreGuts() [1/2]

void RWDBUniqueConstraintList::restoreGuts ( RWFile & f)
inline

Reads f, replacing the contents of self.

◆ restoreGuts() [2/2]

void RWDBUniqueConstraintList::restoreGuts ( RWvistream & s)
inline

Reads s, replacing the contents of self.

◆ saveGuts() [1/2]

void RWDBUniqueConstraintList::saveGuts ( RWFile & f) const
inline

Writes the contents of self to f.

◆ saveGuts() [2/2]

void RWDBUniqueConstraintList::saveGuts ( RWvostream & s) const
inline

Writes the contents of self to s.

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