GDAL

ogremulatedtransaction.h
1/******************************************************************************
2 * $Id$
3 *
4 * Project: OpenGIS Simple Features Reference Implementation
5 * Purpose: Defines OGRDataSourceWithTransaction class
6 * Author: Even Rouault, even dot rouault at spatialys dot com
7 *
8 ******************************************************************************
9 * Copyright (c) 2015, Even Rouault <even dot rouault at spatialys dot com>
10 *
11 * SPDX-License-Identifier: MIT
12 ****************************************************************************/
13
14#ifndef OGREMULATEDTRANSACTION_H_INCLUDED
15#define OGREMULATEDTRANSACTION_H_INCLUDED
16
17#include "ogrsf_frmts.h"
18
24 class CPL_DLL IOGRTransactionBehaviour
25{
26 public:
27 virtual ~IOGRTransactionBehaviour();
28
43 virtual OGRErr StartTransaction(GDALDataset *&poDSInOut,
44 int &bOutHasReopenedDS) = 0;
45
60 virtual OGRErr CommitTransaction(GDALDataset *&poDSInOut,
61 int &bOutHasReopenedDS) = 0;
62
77 virtual OGRErr RollbackTransaction(GDALDataset *&poDSInOut,
78 int &bOutHasReopenedDS) = 0;
79};
80
111 GDALDataset CPL_DLL *OGRCreateEmulatedTransactionDataSourceWrapper(
112 GDALDataset *poBaseDataSource,
113 IOGRTransactionBehaviour *poTransactionBehaviour,
114 int bTakeOwnershipDataSource, int bTakeOwnershipTransactionBehavior);
115
116#endif // OGREMULATEDTRANSACTION_H_INCLUDED
GDALDataset
A set of associated raster bands, usually from one file.
Definition gdal_priv.h:495
IOGRTransactionBehaviour
IOGRTransactionBehaviour is an interface that a driver must implement to provide emulation of transac...
Definition ogremulatedtransaction.h:25
IOGRTransactionBehaviour::StartTransaction
virtual OGRErr StartTransaction(GDALDataset *&poDSInOut, int &bOutHasReopenedDS)=0
Start a transaction.
IOGRTransactionBehaviour::RollbackTransaction
virtual OGRErr RollbackTransaction(GDALDataset *&poDSInOut, int &bOutHasReopenedDS)=0
Rollback a transaction.
IOGRTransactionBehaviour::CommitTransaction
virtual OGRErr CommitTransaction(GDALDataset *&poDSInOut, int &bOutHasReopenedDS)=0
Commit a transaction.
OGRErr
int OGRErr
Type for a OGR error.
Definition ogr_core.h:371
ogrsf_frmts.h
Classes related to registration of format support, and opening datasets.