[commit] r2631 - trunk/GME/Core

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Apr 15 17:36:20 CDT 2016


Author: ksmyth
Date: Fri Apr 15 17:36:20 2016
New Revision: 2631

Log:
Formatting

Modified:
   trunk/GME/Core/CoreAttribute.h
   trunk/GME/Core/CoreObject.cpp

Modified: trunk/GME/Core/CoreAttribute.h
==============================================================================
--- trunk/GME/Core/CoreAttribute.h	Fri Apr 15 17:36:15 2016	(r2630)
+++ trunk/GME/Core/CoreAttribute.h	Fri Apr 15 17:36:20 2016	(r2631)
@@ -106,27 +106,48 @@
 
 // ------- Status
 
-#define COREATTRIBUTE_DIRTY				0x0001
-#define COREATTRIBUTE_LOCKGROUP_LOADED	0x0002
-#define COREATTRIBUTE_COLL_UPTODATE		0x0004
-#define COREATTRIBUTE_LOCK_CLOSED		0x0008
+enum COREATTRIBUTE_LOCK_STATUS {
+	COREATTRIBUTE_DIRTY = 0x0001,
+	COREATTRIBUTE_LOCKGROUP_LOADED = 0x0002,
+	COREATTRIBUTE_COLL_UPTODATE = 0x0004,
+	COREATTRIBUTE_LOCK_CLOSED = 0x0008
+};
 
 public:
-	void SetStatusFlag(status_type flags) NOTHROW { status |= flags; }
-	void ResetStatusFlag(status_type flags) NOTHROW { status &= ~flags; }
-
-	void ChangeStatusFlag(status_type flag, bool set) NOTHROW { if(set) status |= flag; else status &= ~flag; }
-	bool GetStatusFlag(status_type flag) const NOTHROW { return (status & flag) != 0; }
+	void SetStatusFlag(status_type flags) NOTHROW {
+		status |= flags;
+	}
+	void ResetStatusFlag(status_type flags) NOTHROW {
+		status &= ~flags;
+	}
+
+	void ChangeStatusFlag(status_type flag, bool set) NOTHROW {
+		if(set)
+			status |= flag;
+		else
+			status &= ~flag;
+	}
+	bool GetStatusFlag(status_type flag) const NOTHROW { 
+		return (status & flag) != 0; 
+	}
 
 public:
 	bool InTransaction() const NOTHROW;
 	bool InWriteTransaction() const NOTHROW;
 	bool IsZombie() const NOTHROW;
 
-	bool IsDirty() const NOTHROW { return GetStatusFlag(COREATTRIBUTE_DIRTY); }
-	void SetDirty() NOTHROW { SetStatusFlag(COREATTRIBUTE_DIRTY); }
-	void ResetDirty() NOTHROW { ResetStatusFlag(COREATTRIBUTE_DIRTY); }
-	void ChangeDirty(bool dirty) { ChangeStatusFlag(COREATTRIBUTE_DIRTY, dirty); }
+	bool IsDirty() const NOTHROW { 
+		return GetStatusFlag(COREATTRIBUTE_DIRTY);
+	}
+	void SetDirty() NOTHROW { 
+		SetStatusFlag(COREATTRIBUTE_DIRTY); 
+	}
+	void ResetDirty() NOTHROW { 
+		ResetStatusFlag(COREATTRIBUTE_DIRTY);
+	}
+	void ChangeDirty(bool dirty) { 
+		ChangeStatusFlag(COREATTRIBUTE_DIRTY, dirty); 
+	}
 
 // ------- FinalTrItem
 

Modified: trunk/GME/Core/CoreObject.cpp
==============================================================================
--- trunk/GME/Core/CoreObject.cpp	Fri Apr 15 17:36:15 2016	(r2630)
+++ trunk/GME/Core/CoreObject.cpp	Fri Apr 15 17:36:20 2016	(r2631)
@@ -522,7 +522,7 @@
 	while( i != e )
 	{
 		if ((*i)->GetAttrID() == ATTRID_LOCK)
-			ASSERT(!((CCoreLockAttribute*)*i)->GetStatusFlag(COREATTRIBUTE_LOCKGROUP_LOADED));
+			ASSERT(!((CCoreLockAttribute*)*i)->GetStatusFlag(CCoreAttribute::COREATTRIBUTE_LOCKGROUP_LOADED));
 
 		(*i)->Release();
 		i++;


More information about the gme-commit mailing list