[GME-commit]
GMESRC/SDK/BON BONImpl.h,1.22,1.23 BONImpl.cpp,1.36,1.37
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Nov 9 17:24:48 CST 2006
Update of /project/gme-repository/GMESRC/SDK/BON
In directory escher:/tmp/cvs-serv30064
Modified Files:
BONImpl.h BONImpl.cpp
Log Message:
Introducing finetuned ProjectImpl::findByID.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: BONImpl.h
===================================================================
RCS file: /project/gme-repository/GMESRC/SDK/BON/BONImpl.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** BONImpl.h 2 Nov 2006 21:39:18 -0000 1.22
--- BONImpl.h 9 Nov 2006 17:24:46 -0000 1.23
***************
*** 149,152 ****
--- 149,154 ----
void setAutoCommit( bool bAutoCommit );
void commit();
+ void commitOnly();
+ void beginOnly();
void abort();
bool isDestructionActive() const;
***************
*** 211,215 ****
std::set<Folder> getLibraries(); // CHANGED LINE
! Object findByID( const std::string& strID, bool bExc_IfNotExist = false );
std::set<Object> findByKind( const MON::Object& meta );
std::set<Object> findByKind( const std::string& strKind );
--- 213,217 ----
std::set<Folder> getLibraries(); // CHANGED LINE
! Object findByID( const std::string& strID, bool bExc_IfNotExist = false, bool bTolerateZombies = false );
std::set<Object> findByKind( const MON::Object& meta );
std::set<Object> findByKind( const std::string& strKind );
Index: BONImpl.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/SDK/BON/BONImpl.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** BONImpl.cpp 2 Nov 2006 21:39:18 -0000 1.36
--- BONImpl.cpp 9 Nov 2006 17:24:46 -0000 1.37
***************
*** 454,457 ****
--- 454,470 ----
}
+ void ProjectImpl::commitOnly()
+ {
+ COMTHROW( m_spProject->CommitTransaction() );
+ }
+
+ void ProjectImpl::beginOnly()
+ {
+ if (!m_spTerritory) {
+ COMTHROW( m_spProject->CreateTerritory( NULL, m_spTerritory.Addr() ) );
+ }
+ COMTHROW( m_spProject->BeginTransaction( m_spTerritory ) );
+ }
+
void ProjectImpl::abort()
{
***************
*** 1007,1013 ****
// CHANGED LINE END
! Object ProjectImpl::findByID( const std::string& strID, bool bExIfNotExist )
{
BON::Object object = findByIDI( strID );
if ( bExIfNotExist && ! object )
{
--- 1020,1029 ----
// CHANGED LINE END
! Object ProjectImpl::findByID( const std::string& strID, bool bExIfNotExist, bool bTolerateZombies )
{
BON::Object object = findByIDI( strID );
+ if( !bTolerateZombies && object && object->getStatus() != OST_Exists)
+ object = Object(); // if we don't tolerate zombie objects, then object is made 0
+
if ( bExIfNotExist && ! object )
{
More information about the GME-commit
mailing list