#ifndef BUCKET_H #define BUCKET_H /* Copyright (c) 1999, Gary Yihsiang Hsiao. All Rights Reserved. bugs report to: ghsiao@rbcds.com or ghsiao@netzero.net Permission to use, copy, modify, and distribute this software for NON-COMMERCIAL purposes and without fee is hereby granted provided that this copyright notice appears in all copies. This software is distributed on an 'as is' basis without warranty. */ #include "POBroker.h" class Bucket : public POBObj { public: static POBObj* create() { return (POBObj*) new Bucket; } Bucket(){}; Bucket(const double* d, int size); ~Bucket(); operator const string& (); void operator=(const string&); // design by composition requires implementation glue for functionality void push_back( double d ) { items.push_back(d); } // or expose the collection that needs changing vector<double>& get_items() { return items; } // friends friend ostream& operator<<(ostream& os, Bucket& b); private: vector<double> items; }; #endif
Hosted by www.Geocities.ws

1