Author: toshok
Date: 2007-06-06 23:44:55 -0400 (Wed, 06 Jun 2007)
New Revision: 78810
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/runtime.cpp
trunk/moon/src/runtime.h
Log:
2007-06-06 Chris Toshok <[EMAIL PROTECTED]>
* runtime.h, runtime.cpp: move the Value implementation (for
everything but the operators) to the .cpp file.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-06-07 03:44:16 UTC (rev 78809)
+++ trunk/moon/src/ChangeLog 2007-06-07 03:44:55 UTC (rev 78810)
@@ -1,3 +1,8 @@
+2007-06-06 Chris Toshok <[EMAIL PROTECTED]>
+
+ * runtime.h, runtime.cpp: move the Value implementation (for
+ everything but the operators) to the .cpp file.
+
2007-06-06 Miguel de Icaza <[EMAIL PROTECTED]>
* runtime.h, runtime.cpp: Surface is no longer derived from
Modified: trunk/moon/src/runtime.cpp
===================================================================
--- trunk/moon/src/runtime.cpp 2007-06-07 03:44:16 UTC (rev 78809)
+++ trunk/moon/src/runtime.cpp 2007-06-07 03:44:55 UTC (rev 78810)
@@ -71,7 +71,108 @@
collection->list = g_slist_remove (collection->list, data);
}
+
+
/**
+ * Value implementation
+ */
+
+void
+Value::Init ()
+{
+ memset (&u, 0, sizeof (u));
+}
+
+Value::Value()
+ : k (INVALID)
+{
+}
+
+Value::Value(bool z)
+{
+ Init ();
+ k = BOOL;
+ u.z = z;
+}
+
+Value::Value (double d)
+{
+ Init ();
+ k = DOUBLE;
+ u.d = d;
+}
+
+Value::Value (guint64 i)
+{
+ Init ();
+ k = UINT64;
+ u.ui64 = i;
+}
+
+Value::Value (gint64 i)
+{
+ Init ();
+ k = INT64;
+ u.i64 = i;
+}
+
+Value::Value (gint32 i)
+{
+ Init ();
+ k = INT32;
+ u.i32 = i;
+}
+
+Value::Value (Color* c)
+{
+ Init ();
+ k = COLOR;
+ u.color = new Color (c);
+}
+
+Value::Value (DependencyObject *obj)
+{
+ g_assert (obj != NULL);
+
+ Init ();
+ k = DEPENDENCY_OBJECT;
+ u.dependency_object = obj;
+}
+
+Value::Value (Point *pt)
+{
+ g_assert (pt != NULL);
+
+ Init ();
+ k = POINT;
+ u.point = new Point (pt);
+}
+
+Value::Value (Rect *rect)
+{
+ g_assert (rect != NULL);
+
+ Init ();
+ k = RECT;
+ u.rect = new Rect (rect);
+}
+
+Value::Value (const char* s)
+{
+ Init ();
+ k = STRING;
+ u.s= g_strdup (s);
+}
+
+Value::~Value ()
+{
+ if (k == STRING)
+ g_free (u.s);
+}
+
+
+
+/**
* item_getbounds:
* @item: the item to update the bounds of
*
Modified: trunk/moon/src/runtime.h
===================================================================
--- trunk/moon/src/runtime.h 2007-06-07 03:44:16 UTC (rev 78809)
+++ trunk/moon/src/runtime.h 2007-06-07 03:44:55 UTC (rev 78810)
@@ -191,6 +191,8 @@
FRAMEWORKELEMENT,
NAMESCOPE,
CLOCK,
+ ANIMATIONCLOCK,
+ CLOCKGROUP,
BRUSH,
SOLIDCOLORBRUSH,
PATHFIGURE,
@@ -218,82 +220,22 @@
Rect *rect;
} u;
- Value () : k (INVALID) {}
-
- void Init ()
- {
- memset (&u, 0, sizeof (u));
- }
+ void Init ();
- Value (bool z)
- {
- Init ();
- k = BOOL;
- u.z = z;
- }
-
- Value (double d)
- {
- Init ();
- k = DOUBLE;
- u.d = d;
- }
-
- Value (guint64 i)
- {
- Init ();
- k = UINT64;
- u.ui64 = i;
- }
-
- Value (gint64 i)
- {
- Init ();
- k = INT64;
- u.i64 = i;
- }
-
- Value (gint32 i)
- {
- Init ();
- k = INT32;
- u.i32 = i;
- }
-
- Value (Color *c)
- {
- Init ();
- k = COLOR;
- u.color = new Color (c);
- }
-
- Value (DependencyObject *obj)
- {
- g_assert (obj != NULL);
-
- Init ();
- k = DEPENDENCY_OBJECT;
- u.dependency_object = obj;
- }
-
- Value (Point *pt)
- {
- g_assert (pt != NULL);
-
- Init ();
- k = POINT;
- u.point = new Point (pt);
- }
-
- Value (Rect *rect)
- {
- g_assert (rect != NULL);
-
- Init ();
- k = RECT;
- u.rect = new Rect (rect);
- }
+ Value ();
+ Value (bool z);
+ Value (double d);
+ Value (guint64 i);
+ Value (gint64 i);
+ Value (gint32 i);
+ Value (Color *c);
+ Value (DependencyObject *obj);
+ Value (Point *pt);
+ Value (Rect *rect);
+ Value (const char* s);
+ ~Value ();
+
bool operator!= (const Value &v) const
{
return !(*this == v);
@@ -313,19 +255,6 @@
return true;
}
-
- Value (const char* s)
- {
- Init ();
- k = STRING;
- u.s= g_strdup (s);
- }
-
- ~Value ()
- {
- if (k == STRING)
- g_free (u.s);
- }
};
//
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches