Debea Library 1.4.2

ostream.h

00001 // File: ostream.h
00002 // Purpose: Base class for archive output streams
00003 // Author: Lukasz Michalski <lm at zork.pl>, Copyright 2007
00004 // License: See COPYING file that comes with this distribution
00005 //
00006 // This file is a part of debea library (http://debea.net)
00007
00008 #ifndef DBAOSTREAM_H
00009 #define DBAOSTREAM_H
00010 
00011 #include <vector>
00012 #include "dba/stream.h"
00013
00014 namespace dba {
00015
00021 class dbaDLLEXPORT OStream : public Stream {
00022   public:
00026     OStream();
00028
00032     virtual void begin() = 0;
00037     virtual void commit() = 0;
00042     virtual void rollback() = 0;
00051     virtual bool put(Storeable* pObject);
00059     virtual void open(const char* pRootTable = NULL);
00064     virtual void assignId(Storeable* pObject) throw (Exception) = 0;
00068     virtual ~OStream() {};
00069   protected:
00070     virtual void initMemberChildrenStore(const Storeable& pObject, const ColMemberEntry& pMember) {};
00071     virtual void endMemberChildrenStore(const Storeable& pObject, const ColMemberEntry& pMember) {};
00082     virtual bool putMemberChildren(Storeable* pObject, ColMemberEntry& pMember, CollectionFilterBase& pFilter, const char* pTableName);
00087     virtual bool putChildren(Storeable* pObject);
00095     virtual bool eraseChildren(const std::vector<id>& pRefData, Storeable& pObj, const char* pRootTableName);
00096   private:
00101     virtual bool erase(Storeable* pObject) = 0;
00106     virtual bool update(Storeable* pObject) = 0;
00111     virtual bool store(Storeable* pObject) = 0;
00121     virtual std::vector<id> loadRefData(const char* pTable, const char* pFkName, id pCollId, id pId);
00127     virtual bool deleteRefData(const std::vector<id>& pIds, const char* pTableName);
00128 };
00129
00130 #ifdef DBA_COMPAT_1_0
00131 typedef OStream OOStream;
00132 #endif
00133 
00134 };
00135
00136 #endif

Documentation
Quick start
Examples

API Documentation
Class hierarchy
Member index
API Reference
Store filters
Store table macros
Back

Generated by doxygen at Fri Oct 22 23:15:38 2010