2009-12-01 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / src / propertypath.h
blob53ddefcbb86c0d377a34bc8001bec928812992d9
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * propertypath.h:
5 * Contact:
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2009 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
13 #ifndef __PROPERTY_PATH_H__
14 #define __PROPERTY_PATH_H__
16 #include <glib.h>
17 #include <string.h>
19 /* @IncludeInKinds */
20 struct PropertyPath {
21 public:
22 PropertyPath (DependencyProperty *property)
24 this->path = NULL;
25 this->expanded_path = NULL;
26 this->property = property;
29 PropertyPath (const char *path)
31 this->path = g_strdup (path);
32 this->expanded_path = NULL;
33 this->property = NULL;
36 PropertyPath (const PropertyPath &path)
38 this->path = g_strdup (path.path);
39 this->expanded_path = g_strdup (path.expanded_path);
40 this->property = path.property;
43 ~PropertyPath ()
45 g_free (path);
46 g_free (expanded_path);
49 bool operator== (const PropertyPath &v) const
51 if (path) {
52 return v.path && !strcmp (v.path, path);
54 else {
55 return v.property == property;
59 bool operator!= (const PropertyPath &v) const
61 return !(*this == v);
64 char *path;
65 char *expanded_path; // This is a path with namespaces expanded into full assembly names
66 DependencyProperty *property;
69 #endif