2 #include "zipios++/zipios-config.h"
4 #include "zipios++/meta-iostreams.h"
13 CollectionCollection *CollectionCollection::_inst = 0 ;
24 if (
this == &collection || ! collection.
isValid() )
26 _collections.push_back( collection.
clone() ) ;
34 if ( collection == 0 ||
this == collection || ! collection->
isValid() )
36 _collections.push_back( collection ) ;
50 ConstEntries all_entries ;
51 std::vector< FileCollection * >::const_iterator it ;
52 for ( it = _collections.begin() ; it != _collections.end() ; it++ )
53 all_entries += (*it)->entries() ;
59 MatchPath matchpath )
const {
63 std::vector< FileCollection * >::const_iterator it ;
66 getEntry( name, cep, it, matchpath ) ;
74 throw InvalidStateException(
"Attempt to get an input stream from an invalid CollectionCollection" ) ;
81 MatchPath matchpath ) {
83 throw InvalidStateException(
"Attempt to get an input stream from an invalid CollectionCollection" ) ;
85 std::vector< FileCollection * >::const_iterator it ;
88 getEntry( entry_name, cep, it, matchpath ) ;
93 return (*it)->getInputStream( entry_name ) ;
102 std::vector< FileCollection * >::const_iterator it ;
103 for ( it = _collections.begin() ; it != _collections.end() ; it++ )
104 sz += (*it)->size() ;
112 CollectionCollection::~CollectionCollection() {
113 std::vector< FileCollection * >::iterator it ;
114 for ( it = _collections.begin() ; it != _collections.end() ; ++it )
125 std::vector< FileCollection * >::const_iterator &it,
126 MatchPath matchpath )
const {
130 for ( it = _collections.begin() ; it != _collections.end() ; it++ ) {
131 cep = (*it)->getEntry( name, matchpath ) ;