[Haiku-commits] r31127 - in haiku/trunk: headers/private/shared src/apps/debuganalyzer src/apps/debuganalyzer/gui/main_window src/apps/debuganalyzer/gui/table src/apps/debuganalyzer/gui/thread_window src/apps/debuganalyzer/util src/apps/debugger src/apps/debugger/arch src/apps/debugger/arch/x86 src/apps/debugger/gui/team_window src/kits/shared

bonefish at BerliOS bonefish at mail.berlios.de
Sat Jun 20 01:00:28 CEST 2009


Author: bonefish
Date: 2009-06-20 01:00:25 +0200 (Sat, 20 Jun 2009)
New Revision: 31127
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31127&view=rev

Added:
   haiku/trunk/headers/private/shared/Variant.h
   haiku/trunk/src/kits/shared/Variant.cpp
Removed:
   haiku/trunk/src/apps/debuganalyzer/util/Variant.cpp
   haiku/trunk/src/apps/debuganalyzer/util/Variant.h
Modified:
   haiku/trunk/src/apps/debuganalyzer/Jamfile
   haiku/trunk/src/apps/debuganalyzer/gui/main_window/TeamsPage.cpp
   haiku/trunk/src/apps/debuganalyzer/gui/main_window/ThreadsPage.cpp
   haiku/trunk/src/apps/debuganalyzer/gui/table/Table.cpp
   haiku/trunk/src/apps/debuganalyzer/gui/table/Table.h
   haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.cpp
   haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.h
   haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.cpp
   haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.h
   haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.cpp
   haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.h
   haiku/trunk/src/apps/debuganalyzer/gui/thread_window/WaitObjectsPage.cpp
   haiku/trunk/src/apps/debuganalyzer/util/Jamfile
   haiku/trunk/src/apps/debugger/Jamfile
   haiku/trunk/src/apps/debugger/arch/CpuState.h
   haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.cpp
   haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.h
   haiku/trunk/src/apps/debugger/gui/team_window/ImageListView.cpp
   haiku/trunk/src/apps/debugger/gui/team_window/RegisterView.cpp
   haiku/trunk/src/apps/debugger/gui/team_window/StackTraceView.cpp
   haiku/trunk/src/apps/debugger/gui/team_window/ThreadListView.cpp
   haiku/trunk/src/kits/shared/Jamfile
Log:
Renamed Variant to BVariant and moved it to libshared.a.


Copied: haiku/trunk/headers/private/shared/Variant.h (from rev 31119, haiku/trunk/src/apps/debuganalyzer/util/Variant.h)
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/util/Variant.h	2009-06-19 17:26:59 UTC (rev 31119)
+++ haiku/trunk/headers/private/shared/Variant.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -0,0 +1,314 @@
+/*
+ * Copyright 2009, Ingo Weinhold, ingo_weinhold at gmx.de.
+ * Distributed under the terms of the MIT License.
+ */
+#ifndef _VARIANT_H
+#define _VARIANT_H
+
+
+#include <SupportDefs.h>
+#include <TypeConstants.h>
+
+
+enum {
+	B_VARIANT_DONT_COPY_DATA	= 0x01,
+	B_VARIANT_OWNS_DATA			= 0x02
+};
+
+
+class BVariant {
+public:
+	inline						BVariant();
+	inline						BVariant(int8 value);
+	inline						BVariant(uint8 value);
+	inline						BVariant(int16 value);
+	inline						BVariant(uint16 value);
+	inline						BVariant(int32 value);
+	inline						BVariant(uint32 value);
+	inline						BVariant(int64 value);
+	inline						BVariant(uint64 value);
+	inline						BVariant(float value);
+	inline						BVariant(double value);
+	inline						BVariant(const void* value);
+	inline						BVariant(const char* value,
+									uint32 flags = 0);
+	inline						BVariant(const BVariant& other);
+								~BVariant();
+
+	inline	void				SetTo(const BVariant& other);
+	inline	void				SetTo(int8 value);
+	inline	void				SetTo(uint8 value);
+	inline	void				SetTo(int16 value);
+	inline	void				SetTo(uint16 value);
+	inline	void				SetTo(int32 value);
+	inline	void				SetTo(uint32 value);
+	inline	void				SetTo(int64 value);
+	inline	void				SetTo(uint64 value);
+	inline	void				SetTo(float value);
+	inline	void				SetTo(double value);
+	inline	void				SetTo(const void* value);
+	inline	void				SetTo(const char* value,
+									uint32 flags = 0);
+			void				Unset();
+
+	inline	BVariant&			operator=(const BVariant& other);
+
+			type_code			Type() const		{ return fType; }
+
+			bool				IsNumber() const;
+			bool				IsInteger() const;
+			bool				IsFloat() const;
+									// floating point, not just float
+
+			int8				ToInt8() const;
+			uint8				ToUInt8() const;
+			int16				ToInt16() const;
+			uint16				ToUInt16() const;
+			int32				ToInt32() const;
+			uint32				ToUInt32() const;
+			int64				ToInt64() const;
+			uint64				ToUInt64() const;
+			float				ToFloat() const;
+			double				ToDouble() const;
+			void*				ToPointer() const;
+			const char*			ToString() const;
+
+private:
+			void				_SetTo(const BVariant& other);
+			void				_SetTo(int8 value);
+			void				_SetTo(uint8 value);
+			void				_SetTo(int16 value);
+			void				_SetTo(uint16 value);
+			void				_SetTo(int32 value);
+			void				_SetTo(uint32 value);
+			void				_SetTo(int64 value);
+			void				_SetTo(uint64 value);
+			void				_SetTo(float value);
+			void				_SetTo(double value);
+			void				_SetTo(const void* value);
+			void				_SetTo(const char* value,
+									uint32 flags);
+
+	template<typename NumberType>
+	inline	NumberType			_ToNumber() const;
+
+private:
+			type_code			fType;
+			uint32				fFlags;
+			union {
+				int8			fInt8;
+				uint8			fUInt8;
+				int16			fInt16;
+				uint16			fUInt16;
+				int32			fInt32;
+				uint32			fUInt32;
+				int64			fInt64;
+				uint64			fUInt64;
+				float			fFloat;
+				double			fDouble;
+				void*			fPointer;
+				char*			fString;
+			};
+};
+
+
+BVariant::BVariant()
+	:
+	fType(0),
+	fFlags(0)
+{
+}
+
+
+BVariant::BVariant(int8 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(uint8 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(int16 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(uint16 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(int32 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(uint32 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(int64 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(uint64 value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(float value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(double value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(const void* value)
+{
+	_SetTo(value);
+}
+
+
+BVariant::BVariant(const char* value, uint32 flags)
+{
+	_SetTo(value, flags);
+}
+
+
+BVariant::BVariant(const BVariant& other)
+{
+	_SetTo(other);
+}
+
+
+BVariant&
+BVariant::operator=(const BVariant& other)
+{
+	Unset();
+	_SetTo(other);
+	return *this;
+}
+
+
+void
+BVariant::SetTo(const BVariant& other)
+{
+	Unset();
+	_SetTo(other);
+}
+
+
+void
+BVariant::SetTo(int8 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(uint8 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(int16 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(uint16 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(int32 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(uint32 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(int64 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(uint64 value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(float value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(double value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(const void* value)
+{
+	Unset();
+	_SetTo(value);
+}
+
+
+void
+BVariant::SetTo(const char* value, uint32 flags)
+{
+	Unset();
+	_SetTo(value, flags);
+}
+
+
+#endif	// _VARIANT_H

Modified: haiku/trunk/src/apps/debuganalyzer/Jamfile
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/Jamfile	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/Jamfile	2009-06-19 23:00:25 UTC (rev 31127)
@@ -3,7 +3,7 @@
 UsePrivateHeaders debug interface kernel shared ;
 UsePrivateSystemHeaders ;
 
-HAIKU_DEBUG_ANALYZER_HEADERS = 
+HAIKU_DEBUG_ANALYZER_HEADERS =
 	$(SUBDIR)
 	[ FDirName $(SUBDIR) gui ]
 	[ FDirName $(SUBDIR) model ]
@@ -24,7 +24,7 @@
 	<nogrist>DebugAnalyzer_model_loader.o
 	<nogrist>DebugAnalyzer_util.o
 
-	libcolumnlistview.a libdebug.so be
+	libcolumnlistview.a libshared.a libdebug.so be
 	:
 	DebugAnalyzer.rdef
 ;

Modified: haiku/trunk/src/apps/debuganalyzer/gui/main_window/TeamsPage.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/main_window/TeamsPage.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/main_window/TeamsPage.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -33,7 +33,7 @@
 		return fModel->CountTeams();
 	}
 
-	virtual bool GetValueAt(int32 rowIndex, int32 columnIndex, Variant& value)
+	virtual bool GetValueAt(int32 rowIndex, int32 columnIndex, BVariant& value)
 	{
 		Model::Team* team = fModel->TeamAt(rowIndex);
 		if (team == NULL)
@@ -44,7 +44,7 @@
 				value.SetTo(team->ID());
 				return true;
 			case 1:
-				value.SetTo(team->Name(), VARIANT_DONT_COPY_DATA);
+				value.SetTo(team->Name(), B_VARIANT_DONT_COPY_DATA);
 				return true;
 			case 2:
 				value.SetTo(team->CreationTime());

Modified: haiku/trunk/src/apps/debuganalyzer/gui/main_window/ThreadsPage.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/main_window/ThreadsPage.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/main_window/ThreadsPage.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -33,7 +33,7 @@
 		return fModel->CountThreads();
 	}
 
-	virtual bool GetValueAt(int32 rowIndex, int32 columnIndex, Variant& value)
+	virtual bool GetValueAt(int32 rowIndex, int32 columnIndex, BVariant& value)
 	{
 		Model::Thread* thread = fModel->ThreadAt(rowIndex);
 		if (thread == NULL)
@@ -44,7 +44,7 @@
 				value.SetTo(thread->ID());
 				return true;
 			case 1:
-				value.SetTo(thread->Name(), VARIANT_DONT_COPY_DATA);
+				value.SetTo(thread->Name(), B_VARIANT_DONT_COPY_DATA);
 				return true;
 			case 2:
 			{

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/Table.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/Table.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/Table.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -271,7 +271,7 @@
 		return;
 
 	int32 modelIndex = fTableColumn->ModelIndex();
-	Variant value;
+	BVariant value;
 	if (!fModel->GetValueAt(field->RowIndex(), modelIndex, value))
 		return;
 	fTableColumn->DrawValue(value, rect, targetView);
@@ -293,9 +293,9 @@
 		return 1;
 
 	int32 modelIndex = fTableColumn->ModelIndex();
-	Variant value1;
+	BVariant value1;
 	bool valid1 = fModel->GetValueAt(field1->RowIndex(), modelIndex, value1);
-	Variant value2;
+	BVariant value2;
 	bool valid2 = fModel->GetValueAt(field2->RowIndex(), modelIndex, value2);
 
 	if (!valid1)
@@ -322,7 +322,7 @@
 		return Width();
 
 	int32 modelIndex = fTableColumn->ModelIndex();
-	Variant value;
+	BVariant value;
 	if (!fModel->GetValueAt(field->RowIndex(), modelIndex, value))
 		return Width();
 	return fTableColumn->GetPreferredWidth(value, parent);

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/Table.h
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/Table.h	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/Table.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -9,13 +9,12 @@
 
 #include <ObjectList.h>
 #include <util/DoublyLinkedList.h>
+#include <Variant.h>
 
 #include "table/AbstractTable.h"
 #include "table/TableColumn.h"
 
-#include "Variant.h"
 
-
 class Table;
 class TableModel;
 
@@ -40,7 +39,7 @@
 	virtual	int32				CountRows() const = 0;
 
 	virtual	bool				GetValueAt(int32 rowIndex, int32 columnIndex,
-									Variant& value) = 0;
+									BVariant& value) = 0;
 
 	virtual	bool				AddListener(TableModelListener* listener);
 	virtual	void				RemoveListener(TableModelListener* listener);

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -39,20 +39,20 @@
 
 
 void
-TableColumn::DrawValue(const Variant& value, BRect rect, BView* targetView)
+TableColumn::DrawValue(const BVariant& value, BRect rect, BView* targetView)
 {
 }
 
 
 int
-TableColumn::CompareValues(const Variant& a, const Variant& b)
+TableColumn::CompareValues(const BVariant& a, const BVariant& b)
 {
 	return 0;
 }
 
 
 float
-TableColumn::GetPreferredWidth(const Variant& value, BView* parent) const
+TableColumn::GetPreferredWidth(const BVariant& value, BView* parent) const
 {
 	return Width();
 }

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.h
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.h	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumn.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -8,7 +8,7 @@
 #include <InterfaceDefs.h>
 #include <Rect.h>
 
-#include "Variant.h"
+#include <Variant.h>
 
 
 class BString;
@@ -33,13 +33,13 @@
 	virtual	void				GetColumnName(BString* into) const;
 
 	virtual	void				DrawTitle(BRect rect, BView* targetView);
-	virtual	void				DrawValue(const Variant& value, BRect rect,
+	virtual	void				DrawValue(const BVariant& value, BRect rect,
 									BView* targetView);
-	virtual	int					CompareValues(const Variant& a,
-									const Variant& b);
-	virtual	float				GetPreferredWidth(const Variant& value,
+	virtual	int					CompareValues(const BVariant& a,
+									const BVariant& b);
+	virtual	float				GetPreferredWidth(const BVariant& value,
 									BView* parent) const;
-			
+
 private:
 			int32				fModelIndex;
 			float				fWidth;

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -41,7 +41,7 @@
 
 
 void
-DelagateBasedTableColumn::DrawValue(const Variant& value, BRect rect,
+DelagateBasedTableColumn::DrawValue(const BVariant& value, BRect rect,
 	BView* targetView)
 {
 	fColumnDelegate->DrawField(PrepareField(value), rect, targetView);
@@ -49,7 +49,7 @@
 
 
 float
-DelagateBasedTableColumn::GetPreferredWidth(const Variant& value,
+DelagateBasedTableColumn::GetPreferredWidth(const BVariant& value,
 	BView* parent) const
 {
 	return fColumnDelegate->GetPreferredWidth(PrepareField(value), parent);
@@ -77,7 +77,7 @@
 
 
 BField*
-StringTableColumn::PrepareField(const Variant& value) const
+StringTableColumn::PrepareField(const BVariant& value) const
 {
 	fField.SetString(value.ToString());
 	fField.SetWidth(Width());
@@ -86,7 +86,7 @@
 
 
 int
-StringTableColumn::CompareValues(const Variant& a, const Variant& b)
+StringTableColumn::CompareValues(const BVariant& a, const BVariant& b)
 {
 	return strcasecmp(a.ToString(), b.ToString());
 }
@@ -106,17 +106,17 @@
 
 
 BField*
-Int32TableColumn::PrepareField(const Variant& value) const
+Int32TableColumn::PrepareField(const BVariant& value) const
 {
 	char buffer[16];
 	snprintf(buffer, sizeof(buffer), "%ld", value.ToInt32());
 	return StringTableColumn::PrepareField(
-		Variant(buffer, VARIANT_DONT_COPY_DATA));
+		BVariant(buffer, B_VARIANT_DONT_COPY_DATA));
 }
 
 
 int
-Int32TableColumn::CompareValues(const Variant& a, const Variant& b)
+Int32TableColumn::CompareValues(const BVariant& a, const BVariant& b)
 {
 	return a.ToInt32() - b.ToInt32();
 }
@@ -136,17 +136,17 @@
 
 
 BField*
-Int64TableColumn::PrepareField(const Variant& value) const
+Int64TableColumn::PrepareField(const BVariant& value) const
 {
 	char buffer[32];
 	snprintf(buffer, sizeof(buffer), "%lld", value.ToInt64());
 	return StringTableColumn::PrepareField(
-		Variant(buffer, VARIANT_DONT_COPY_DATA));
+		BVariant(buffer, B_VARIANT_DONT_COPY_DATA));
 }
 
 
 int
-Int64TableColumn::CompareValues(const Variant& a, const Variant& b)
+Int64TableColumn::CompareValues(const BVariant& a, const BVariant& b)
 {
 	int64 diff = a.ToInt64() - b.ToInt64();
 	if (diff == 0)
@@ -170,12 +170,12 @@
 
 
 BField*
-BigtimeTableColumn::PrepareField(const Variant& value) const
+BigtimeTableColumn::PrepareField(const BVariant& value) const
 {
 	bigtime_t time = value.ToInt64();
 	if (time < 0) {
 		return StringTableColumn::PrepareField(
-			Variant("-", VARIANT_DONT_COPY_DATA));
+			BVariant("-", B_VARIANT_DONT_COPY_DATA));
 	}
 
 	int micros = int(time % 1000000);
@@ -189,19 +189,19 @@
 	snprintf(buffer, sizeof(buffer), "%02lld:%02d:%02d:%06d", time, minutes,
 		seconds, micros);
 	return StringTableColumn::PrepareField(
-		Variant(buffer, VARIANT_DONT_COPY_DATA));
+		BVariant(buffer, B_VARIANT_DONT_COPY_DATA));
 }
 
 
 int
-BigtimeTableColumn::CompareValues(const Variant& _a, const Variant& _b)
+BigtimeTableColumn::CompareValues(const BVariant& _a, const BVariant& _b)
 {
 	bigtime_t a = _a.ToInt64();
 	bigtime_t b = _b.ToInt64();
 
 	if (a == b)
 		return 0;
-	
+
 	if (a < 0)
 		return fInvalidFirst ? -1 : 1;
 	if (b < 0)

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.h
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.h	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/TableColumns.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -23,12 +23,12 @@
 	virtual	void				DrawTitle(BRect rect, BView* targetView);
 	virtual	void				GetColumnName(BString* into) const;
 
-	virtual	void				DrawValue(const Variant& value, BRect rect,
+	virtual	void				DrawValue(const BVariant& value, BRect rect,
 									BView* targetView);
-	virtual	float				GetPreferredWidth(const Variant& value,
+	virtual	float				GetPreferredWidth(const BVariant& value,
 									BView* parent) const;
 
-	virtual	BField*				PrepareField(const Variant& value) const = 0;
+	virtual	BField*				PrepareField(const BVariant& value) const = 0;
 
 protected:
 			BColumn*			fColumnDelegate;
@@ -45,10 +45,10 @@
 	virtual						~StringTableColumn();
 
 protected:
-	virtual	BField*				PrepareField(const Variant& value) const;
+	virtual	BField*				PrepareField(const BVariant& value) const;
 
-	virtual	int					CompareValues(const Variant& a,
-									const Variant& b);
+	virtual	int					CompareValues(const BVariant& a,
+									const BVariant& b);
 
 private:
 			BStringColumn		fColumn;
@@ -65,10 +65,10 @@
 									alignment align = B_ALIGN_RIGHT);
 
 protected:
-	virtual	BField*				PrepareField(const Variant& value) const;
+	virtual	BField*				PrepareField(const BVariant& value) const;
 
-	virtual	int					CompareValues(const Variant& a,
-									const Variant& b);
+	virtual	int					CompareValues(const BVariant& a,
+									const BVariant& b);
 };
 
 
@@ -81,10 +81,10 @@
 									alignment align = B_ALIGN_RIGHT);
 
 protected:
-	virtual	BField*				PrepareField(const Variant& value) const;
+	virtual	BField*				PrepareField(const BVariant& value) const;
 
-	virtual	int					CompareValues(const Variant& a,
-									const Variant& b);
+	virtual	int					CompareValues(const BVariant& a,
+									const BVariant& b);
 };
 
 
@@ -98,10 +98,10 @@
 									alignment align = B_ALIGN_RIGHT);
 
 protected:
-	virtual	BField*				PrepareField(const Variant& value) const;
+	virtual	BField*				PrepareField(const BVariant& value) const;
 
-	virtual	int					CompareValues(const Variant& a,
-									const Variant& b);
+	virtual	int					CompareValues(const BVariant& a,
+									const BVariant& b);
 
 private:
 			bool				fInvalidFirst;

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -112,7 +112,7 @@
 		return;
 
 	int32 modelIndex = fTableColumn->ModelIndex();
-	Variant value;
+	BVariant value;
 	if (!fModel->GetValueAt(field->Object(), modelIndex, value))
 		return;
 	fTableColumn->DrawValue(value, rect, targetView);
@@ -134,9 +134,9 @@
 		return 1;
 
 	int32 modelIndex = fTableColumn->ModelIndex();
-	Variant value1;
+	BVariant value1;
 	bool valid1 = fModel->GetValueAt(field1->Object(), modelIndex, value1);
-	Variant value2;
+	BVariant value2;
 	bool valid2 = fModel->GetValueAt(field2->Object(), modelIndex, value2);
 
 	if (!valid1)
@@ -163,7 +163,7 @@
 		return Width();
 
 	int32 modelIndex = fTableColumn->ModelIndex();
-	Variant value;
+	BVariant value;
 	if (!fModel->GetValueAt(field->Object(), modelIndex, value))
 		return Width();
 	return fTableColumn->GetPreferredWidth(value, parent);

Modified: haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.h
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.h	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/table/TreeTable.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -6,13 +6,12 @@
 #define TREE_TABLE_H
 
 #include <ColumnTypes.h>
+#include <Variant.h>
 
 #include "table/AbstractTable.h"
 #include "table/TableColumn.h"
 
-#include "Variant.h"
 
-
 class TreeTable;
 
 
@@ -27,7 +26,7 @@
 	virtual	void*				ChildAt(void* parent, int32 index) const = 0;
 
 	virtual	bool				GetValueAt(void* object, int32 columnIndex,
-									Variant& value) = 0;
+									BVariant& value) = 0;
 };
 
 

Modified: haiku/trunk/src/apps/debuganalyzer/gui/thread_window/WaitObjectsPage.cpp
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/gui/thread_window/WaitObjectsPage.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/gui/thread_window/WaitObjectsPage.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -55,7 +55,7 @@
 		return 6;
 	}
 
-	virtual bool GetValueAt(void* object, int32 columnIndex, Variant& value)
+	virtual bool GetValueAt(void* object, int32 columnIndex, BVariant& value)
 	{
 		return ((Node*)object)->GetValueAt(columnIndex, value);
 	}
@@ -66,7 +66,7 @@
 
 		virtual int32 CountChildren() const = 0;
 		virtual void* ChildAt(int32 index) const = 0;
-		virtual bool GetValueAt(int32 columnIndex, Variant& value) = 0;
+		virtual bool GetValueAt(int32 columnIndex, BVariant& value) = 0;
 	};
 
 	struct ObjectNode : Node {
@@ -88,7 +88,7 @@
 			return NULL;
 		}
 
-		virtual bool GetValueAt(int32 columnIndex, Variant& value)
+		virtual bool GetValueAt(int32 columnIndex, BVariant& value)
 		{
 			return _GetWaitObjectValueAt(object, columnIndex, value);
 		}
@@ -123,7 +123,7 @@
 			return objectNodes.ItemAt(index);
 		}
 
-		virtual bool GetValueAt(int32 columnIndex, Variant& value)
+		virtual bool GetValueAt(int32 columnIndex, BVariant& value)
 		{
 			if (columnIndex <= 2) {
 				return _GetWaitObjectValueAt(group->WaitObjectAt(0),
@@ -174,7 +174,7 @@
 			return groupNodes.ItemAt(index);
 		}
 
-		virtual bool GetValueAt(int32 columnIndex, Variant& value)
+		virtual bool GetValueAt(int32 columnIndex, BVariant& value)
 		{
 			return false;
 		}
@@ -215,15 +215,15 @@
 	}
 
 	static bool _GetWaitObjectValueAt(Model::ThreadWaitObject* waitObject,
-		int32 columnIndex, Variant& value)
+		int32 columnIndex, BVariant& value)
 	{
 		switch (columnIndex) {
 			case 0:
 				value.SetTo(_TypeToString(waitObject->Type()),
-					VARIANT_DONT_COPY_DATA);
+					B_VARIANT_DONT_COPY_DATA);
 				return true;
 			case 1:
-				value.SetTo(waitObject->Name(), VARIANT_DONT_COPY_DATA);
+				value.SetTo(waitObject->Name(), B_VARIANT_DONT_COPY_DATA);
 				return true;
 			case 2:
 			{

Modified: haiku/trunk/src/apps/debuganalyzer/util/Jamfile
===================================================================
--- haiku/trunk/src/apps/debuganalyzer/util/Jamfile	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debuganalyzer/util/Jamfile	2009-06-19 23:00:25 UTC (rev 31127)
@@ -9,5 +9,4 @@
 MergeObject DebugAnalyzer_util.o
 	:
 	DataSource.cpp
-	Variant.cpp
 ;

Deleted: haiku/trunk/src/apps/debuganalyzer/util/Variant.cpp

Deleted: haiku/trunk/src/apps/debuganalyzer/util/Variant.h

Modified: haiku/trunk/src/apps/debugger/Jamfile
===================================================================
--- haiku/trunk/src/apps/debugger/Jamfile	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debugger/Jamfile	2009-06-19 23:00:25 UTC (rev 31127)
@@ -16,7 +16,6 @@
 
 SubDirHdrs [ FDirName $(HAIKU_TOP) src bin debug ] ;
 SubDirHdrs [ FDirName $(debugAnalyzerSources) gui ] ;
-SubDirHdrs [ FDirName $(debugAnalyzerSources) util ] ;
 
 Application Debugger :
 	Debugger.cpp
@@ -54,9 +53,6 @@
 	TeamWindow.cpp
 	ThreadListView.cpp
 
-	# DebugAnalyzer:util
-	Variant.cpp
-
 # DWARF
 #	attribute_classes.cpp
 #	AttributeValue.cpp
@@ -71,6 +67,7 @@
 
 	<bin>debug_utils.a
 	libcolumnlistview.a
+	libshared.a
 
 	$(TARGET_LIBSTDC++)
 	be debug
@@ -78,7 +75,4 @@
 	: Debugger.rdef
 ;
 
-SEARCH on [ FGristFiles Variant.cpp ]
-	= [ FDirName $(debugAnalyzerSources) util ] ;
-
 HaikuSubInclude gui running_teams_window ;

Modified: haiku/trunk/src/apps/debugger/arch/CpuState.h
===================================================================
--- haiku/trunk/src/apps/debugger/arch/CpuState.h	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debugger/arch/CpuState.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -8,10 +8,9 @@
 #include <OS.h>
 
 #include <Referenceable.h>
+#include <Variant.h>
 
-#include "Variant.h"
 
-
 class Register;
 
 
@@ -20,7 +19,7 @@
 	virtual						~CpuState();
 
 	virtual	bool				GetRegisterValue(const Register* reg,
-									Variant& _value) = 0;
+									BVariant& _value) = 0;
 };
 
 

Modified: haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -43,7 +43,7 @@
 
 
 bool
-CpuStateX86::GetRegisterValue(const Register* reg, Variant& _value)
+CpuStateX86::GetRegisterValue(const Register* reg, BVariant& _value)
 {
 	int32 index = reg->Index();
 	if (!IsRegisterSet(index))

Modified: haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.h
===================================================================
--- haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.h	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debugger/arch/x86/CpuStateX86.h	2009-06-19 23:00:25 UTC (rev 31127)
@@ -47,7 +47,7 @@
 	virtual						~CpuStateX86();
 
 	virtual	bool				GetRegisterValue(const Register* reg,
-									Variant& _value);
+									BVariant& _value);
 
 			bool				IsRegisterSet(int32 index) const;
 			uint32				IntRegisterValue(int32 index) const;

Modified: haiku/trunk/src/apps/debugger/gui/team_window/ImageListView.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/gui/team_window/ImageListView.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debugger/gui/team_window/ImageListView.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -97,7 +97,7 @@
 		return fImages.CountItems();
 	}
 
-	virtual bool GetValueAt(int32 rowIndex, int32 columnIndex, Variant& value)
+	virtual bool GetValueAt(int32 rowIndex, int32 columnIndex, BVariant& value)
 	{
 		Image* image = fImages.ItemAt(rowIndex);
 		if (image == NULL)
@@ -108,7 +108,7 @@
 				value.SetTo(image->ID());
 				return true;
 			case 1:
-				value.SetTo(image->Name(), VARIANT_DONT_COPY_DATA);
+				value.SetTo(image->Name(), B_VARIANT_DONT_COPY_DATA);
 				return true;
 			default:
 				return false;
@@ -233,12 +233,12 @@
 {
 	fImagesTable = new Table("images list", 0);
 	AddChild(fImagesTable->ToView());
-	
+
 	// columns
 	fImagesTable->AddColumn(new Int32TableColumn(0, "ID", 40, 20, 1000,
 		B_TRUNCATE_MIDDLE, B_ALIGN_RIGHT));
 	fImagesTable->AddColumn(new StringTableColumn(1, "Name", 80, 40, 1000,
 		B_TRUNCATE_END, B_ALIGN_LEFT));
-	
+
 	fImagesTable->AddTableListener(this);
 }

Modified: haiku/trunk/src/apps/debugger/gui/team_window/RegisterView.cpp
===================================================================
--- haiku/trunk/src/apps/debugger/gui/team_window/RegisterView.cpp	2009-06-19 22:13:32 UTC (rev 31126)
+++ haiku/trunk/src/apps/debugger/gui/team_window/RegisterView.cpp	2009-06-19 23:00:25 UTC (rev 31127)
@@ -31,15 +31,15 @@
 	}
 
 protected:

[... truncated: 479 lines follow ...]



More information about the Haiku-commits mailing list