src/foundation/ZNodeRep_Overlay.h

00001 /*  @(#) $Id: ZNodeRep_Overlay.h,v 1.3 2006/07/23 22:00:42 agreen Exp $ */
00002 
00003 /* ------------------------------------------------------------
00004 Copyright (c) 2006 Andrew Green and Learning in Motion, Inc.
00005 http://www.zoolib.org
00006 
00007 Permission is hereby granted, free of charge, to any person obtaining a copy
00008 of this software and associated documentation files (the "Software"), to deal
00009 in the Software without restriction, including without limitation the rights
00010 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00011 copies of the Software, and to permit persons to whom the Software is
00012 furnished to do so, subject to the following conditions:
00013 
00014 The above copyright notice and this permission notice shall be included in
00015 all copies or substantial portions of the Software.
00016 
00017 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00018 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00019 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00020 COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00021 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00022 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00023 ------------------------------------------------------------ */
00024 
00025 #ifndef __ZNodeRep_Overlay__
00026 #define __ZNodeRep_Overlay__ 1
00027 #include "zconfig.h"
00028 
00029 #include "ZNode.h"
00030 
00031 // =================================================================================================
00032 #pragma mark -
00033 #pragma mark * ZNodeRep_Overlay
00034 
00035 class ZNodeRep_Overlay : public ZNodeRep
00036         {
00037 public:
00038         ZNodeRep_Overlay(ZRef<ZNodeRep> iParent,
00039                 const std::string& iName, const std::vector<ZRef<ZNodeRep> >& iOverlays);
00040 
00041 // From ZNodeRep
00042         virtual ZRef<ZNodeIterRep> CreateIterRep();
00043 
00044         virtual bool GetProp(const std::string& iPropName, ZTupleValue& oTV, Error* oError);
00045         virtual bool CanHaveChildren(Error* oError);
00046 
00047         virtual std::string GetName(Error* oError);
00048         virtual ZTrail TrailTo(ZRef<ZNodeRep> iDest, Error* oError);
00049 
00050         virtual ZRef<ZNodeRep> GetAncestor(size_t iCount, Error* oError);
00051         virtual ZRef<ZNodeRep> GetDescendant(const std::string* iComps, size_t iCount, Error* oError);
00052 
00053         virtual bool Exists(Error* oError);
00054 
00055         virtual ZRef<ZNodeRep> CreateDir(Error* oError);
00056 
00057         virtual ZRef<ZNodeRep> MoveTo(ZRef<ZNodeRep> iDest, Error* oError);
00058 //##    virtual ZRef<ZNodeRep> MoveFrom(ZRef<ZNodeRep> iSource, Error* oError);
00059         virtual bool Delete(Error* oError);
00060 
00061         virtual ZRef<ZStreamerR> OpenR(bool iPreventWriters, Error* oError);
00062         virtual ZRef<ZStreamerRPos> OpenRPos(bool iPreventWriters, Error* oError);
00063         virtual ZRef<ZStreamerW> OpenW(bool iPreventWriters, Error* oError);
00064         virtual ZRef<ZStreamerWPos> OpenWPos(bool iPreventWriters, Error* oError);
00065         virtual ZRef<ZStreamerRWPos> OpenRWPos(bool iPreventWriters, Error* oError);
00066 
00067         virtual ZRef<ZStreamerWPos> CreateWPos(bool iOpenExisting,
00068                 bool iPreventWriters, Error* oError);
00069 
00070         virtual ZRef<ZStreamerRWPos> CreateRWPos(bool iOpenExisting,
00071                 bool iPreventWriters, Error* oError);
00072 
00073 private:
00074         ZRef<ZNodeRep> pGetNodeRep();
00075 
00076         ZRef<ZNodeRep> fParent;
00077         std::string fName;
00078         std::vector<ZRef<ZNodeRep> > fOverlays;
00079         };
00080 
00081 #endif // __ZNodeRep_Overlay__

Generated on Thu Jul 26 11:21:51 2007 for ZooLib by  doxygen 1.4.7