diff options
Diffstat (limited to 'TAO/TAO_IDL/util/utl_list.cpp')
-rw-r--r-- | TAO/TAO_IDL/util/utl_list.cpp | 79 |
1 files changed, 48 insertions, 31 deletions
diff --git a/TAO/TAO_IDL/util/utl_list.cpp b/TAO/TAO_IDL/util/utl_list.cpp index 092c896c804..ffbbe4e52f4 100644 --- a/TAO/TAO_IDL/util/utl_list.cpp +++ b/TAO/TAO_IDL/util/utl_list.cpp @@ -85,98 +85,115 @@ trademarks or registered trademarks of Sun Microsystems, Inc. ACE_RCSID(util, utl_list, "$Id$") -// Constructor -UTL_List::UTL_List (UTL_List *c) - : pd_cdr_data (c) -{ -} +/* + * Constructor(s) + */ -// Destructor -UTL_List::~UTL_List (void) +UTL_List::UTL_List(UTL_List *c) + : pd_cdr_data(c) { -// delete this->pd_cdr_data; -// this->pd_cdr_data = 0; } -// Private operations +/* + * Private operations + */ // Compute list length long -UTL_List::list_length (long n) +UTL_List::list_length(long n) { if (pd_cdr_data == NULL) return n; else - return pd_cdr_data->list_length (n+1); + return pd_cdr_data->list_length(n+1); } -// Public operations +/* + * Public operations + */ // Smash last cdr with l void -UTL_List::nconc (UTL_List *l) +UTL_List::nconc(UTL_List *l) { if (pd_cdr_data == NULL) pd_cdr_data = l; else - pd_cdr_data->nconc (l); + pd_cdr_data->nconc(l); } -// Override this operation to copy lists of other types +/* + * Override this operation to copy lists of other types + */ +// Copy a list UTL_List * -UTL_List::copy () +UTL_List::copy() { if (pd_cdr_data == NULL) - return new UTL_List (NULL); - - return new UTL_List (pd_cdr_data->copy ()); + return new UTL_List(NULL); + return new UTL_List(pd_cdr_data->copy()); } // Get next list UTL_List * -UTL_List::tail () +UTL_List::tail() { return pd_cdr_data; } // Set next list void -UTL_List::set_tail (UTL_List *l) +UTL_List::set_tail(UTL_List *l) { - this->pd_cdr_data = l; + pd_cdr_data = l; } // Compute list length long -UTL_List::length () +UTL_List::length() { - return list_length (1); + return list_length(1); } +/* + * Redefinition of inherited virtual operations + */ + // UTL_List active iterator -// Constructor -UTL_ListActiveIterator::UTL_ListActiveIterator (UTL_List *s) - : source (s) +/* + * Constructor + */ + +UTL_ListActiveIterator::UTL_ListActiveIterator(UTL_List *s) + : source(s) { } /* + * Private operations + */ + +/* * Public operations */ // Is iterator done? long -UTL_ListActiveIterator::is_done () +UTL_ListActiveIterator::is_done() { return (source == NULL) ? I_TRUE : I_FALSE; } // Advance to next item void -UTL_ListActiveIterator::next () +UTL_ListActiveIterator::next() { if (source != NULL) - source = source->tail (); + source = source->tail(); } +/* + * Redefinition of inherited operations + */ + |