/*
 * Automatically generated, do not edit this file directly
 */

/*
 * value.h: Generated code for the type system.
 *
 * Contact:
 *   Moonlight List (moonlight-list@lists.ximian.com)
 *
 * Copyright 2007 Novell, Inc. (http://www.novell.com)
 *
 * See the LICENSE file included with the distribution for details.
 * 
 */

#ifndef MOON_VALUE_H
#define MOON_VALUE_H

#include <glib.h>
#include <string.h>
#include <cairo.h>

#include "type.h"

/* 
 * ugly file containing the catchall value type we use.
 */

struct FontFamily;
struct FontSource;
struct FontWeight;
struct FontStyle;
struct FontStretch;
struct PropertyPath;
struct Color;
struct Duration;
struct KeyTime;
struct Point;
struct Rect;
struct Size;
struct Uri;
struct RepeatBehavior;
struct GridLength;
struct Thickness;
struct CornerRadius;
struct ManagedTypeInfo;

struct Value;

class Type;
class DependencyProperty;
class Surface;
class AnimationStorage;

class Accessibility;
class AlsaSource;
class Animation;
class AnimationClock;
class Application;
class ArcSegment;
class ASFDemuxer;
class ASFMarkerDecoder;
class ASFPacket;
class ASFParser;
class AssemblyPart;
class AssemblyPartCollection;
class ASXDemuxer;
class AudioSource;
class AudioStream;
class BackEase;
class BeginStoryboard;
class BezierSegment;
class BitmapCache;
class BitmapImage;
class BitmapSource;
class BlurEffect;
class Border;
class BounceEase;
class Brush;
class CacheMode;
class Canvas;
class CircleEase;
class Clock;
class ClockGroup;
class CodecDownloader;
class Collection;
class CollectionChangedEventArgs;
class CollectionItemChangedEventArgs;
class ColorAnimation;
class ColorAnimationUsingKeyFrames;
class ColorKeyFrame;
class ColorKeyFrameCollection;
class ColumnDefinition;
class ColumnDefinitionCollection;
class ContentChangedEventArgs;
class ContentControl;
class Control;
class ControlTemplate;
class CubicEase;
class CursorPositionChangedEventArgs;
class DataTemplate;
class DeepZoomImageTileSource;
class DependencyObject;
class DependencyObjectCollection;
class Deployment;
class DiscreteColorKeyFrame;
class DiscreteDoubleKeyFrame;
class DiscreteObjectKeyFrame;
class DiscretePointKeyFrame;
class DispatcherTimer;
class DoubleCollection;
class DoubleAnimation;
class DoubleAnimationUsingKeyFrames;
class DoubleKeyFrame;
class DoubleKeyFrameCollection;
class Downloader;
class DownloadProgressEventArgs;
class DrawingAttributes;
class DropShadowEffect;
class EasingColorKeyFrame;
class EasingDoubleKeyFrame;
class EasingFunctionBase;
class EasingPointKeyFrame;
class Effect;
class ElasticEase;
class Ellipse;
class EllipseGeometry;
class ErrorEventArgs;
class EventArgs;
class EventListenerProxy;
class EventObject;
class EventTrigger;
class ExponentialEase;
class ExtensionPart;
class ExternalDecoder;
class ExternalDemuxer;
class ExternalPart;
class ExternalPartCollection;
class FfmpegDecoder;
class FfmpegDemuxer;
class FileDownloader;
class FileSource;
class FrameworkElement;
class FrameworkTemplate;
class GeneralTransform;
class Geometry;
class GeometryCollection;
class GeometryGroup;
class Glyphs;
class GradientBrush;
class GradientStop;
class GradientStopCollection;
class Grid;
class HitTestCollection;
class Icon;
class IconCollection;
class IImageConverter;
class Image;
class ImageBrush;
class ImageErrorEventArgs;
class ImageSource;
class IMediaDecoder;
class IMediaDemuxer;
class IMediaObject;
class IMediaSource;
class IMediaStream;
class InkPresenter;
class Inline;
class InlineCollection;
class InputMethod;
class InternalDownloader;
class ItemCollection;
class KeyEventArgs;
class KeyFrame;
class KeyFrameCollection;
class KeySpline;
class LayoutInformation;
class Line;
class LinearColorKeyFrame;
class LinearDoubleKeyFrame;
class LinearGradientBrush;
class LinearPointKeyFrame;
class LineBreak;
class LineGeometry;
class LineSegment;
class LogReadyRoutedEventArgs;
class ManagedStreamSource;
class ManualTimeSource;
class MarkerStream;
class Matrix;
class Matrix3D;
class Matrix3DProjection;
class MatrixTransform;
class Media;
class MediaAttribute;
class MediaAttributeCollection;
class MediaBase;
class MediaClosure;
class MediaDisposeObjectClosure;
class MediaElement;
class MediaFrame;
class MediaGetFrameClosure;
class MediaMarker;
class MediaMarkerFoundClosure;
class MediaPlayer;
class MediaReportFrameCompletedClosure;
class MediaReportSeekCompletedClosure;
class MediaSeekClosure;
class MemorySource;
class MmsDemuxer;
class MmsDownloader;
class MmsPlaylistEntry;
class MmsSecondDownloader;
class MmsSource;
class MouseButtonEventArgs;
class MouseEventArgs;
class MouseWheelEventArgs;
class Mp3Demuxer;
class MultiScaleImage;
class MultiScaleSubImage;
class MultiScaleSubImageCollection;
class MultiScaleTileSource;
class NameScope;
class NullDecoder;
class ObjectAnimationUsingKeyFrames;
class ObjectKeyFrame;
class ObjectKeyFrameCollection;
class OutOfBrowserSettings;
class Panel;
class ParallelTimeline;
class ParserErrorEventArgs;
class PassThroughDecoder;
class PasswordBox;
class Path;
class PathFigure;
class PathFigureCollection;
class PathGeometry;
class PathSegment;
class PathSegmentCollection;
class PixelShader;
class PlaneProjection;
class Playlist;
class PlaylistEntry;
class PlaylistRoot;
class PointCollection;
class PointAnimation;
class PointAnimationUsingKeyFrames;
class PointKeyFrame;
class PointKeyFrameCollection;
class PolyBezierSegment;
class Polygon;
class Polyline;
class PolyLineSegment;
class PolyQuadraticBezierSegment;
class Popup;
class PowerEase;
class ProgressEventArgs;
class ProgressiveSource;
class Projection;
class PropertyChangedEventArgs;
class PulseSource;
class QuadraticBezierSegment;
class QuadraticEase;
class QuarticEase;
class QuinticEase;
class RadialGradientBrush;
class Rectangle;
class RectangleGeometry;
class RenderingEventArgs;
class ResourceDictionary;
class ResourceDictionaryCollection;
class RotateTransform;
class RoutedEventArgs;
class RowDefinition;
class RowDefinitionCollection;
class Run;
class ScaleTransform;
class Setter;
class SetterBase;
class SetterBaseCollection;
class ShaderEffect;
class Shape;
class SineEase;
class SizeChangedEventArgs;
class SkewTransform;
class SolidColorBrush;
class SplineColorKeyFrame;
class SplineDoubleKeyFrame;
class SplinePointKeyFrame;
class Storyboard;
class Stroke;
class StrokeCollection;
class Style;
class StylusInfo;
class StylusPoint;
class StylusPointCollection;
class Surface;
class SystemTimeSource;
class TextBlock;
class TextBox;
class TextBoxBase;
class TextBoxModelChangedEventArgs;
class TextBoxView;
class TextChangedEventArgs;
class TextOptions;
class TileBrush;
class Timeline;
class TimelineCollection;
class TimelineGroup;
class TimelineMarker;
class TimelineMarkerCollection;
class TimelineMarkerRoutedEventArgs;
class TimeManager;
class TimeSource;
class TouchDevice;
class TouchPoint;
class TouchPointCollection;
class Transform;
class TransformCollection;
class TransformGroup;
class TranslateTransform;
class TriggerCollection;
class TriggerAction;
class TriggerActionCollection;
class TriggerBase;
class UIElement;
class UIElementCollection;
class UnmanagedMatrix;
class UnmanagedMatrix3D;
class UserControl;
class VideoBrush;
class VideoStream;
class VisualBrush;
class WindowSettings;
class WriteableBitmap;
class YUVConverter;


#if SANITY || DEBUG
#define checked_get_exact(kind, errval, mem)  g_return_val_if_fail (k == (kind), errval); return mem;
#define checked_get_subclass(kind, castas) \
	if (u.dependency_object == NULL || k == (kind)) \
		return (castas*)u.dependency_object;	\
	g_return_val_if_fail (Types::IsSubclassOrSuperclassOf (types, k, kind), NULL); \
	return (castas*)u.dependency_object;
#else
#define checked_get_exact(kind, errval, mem) return mem;
#define checked_get_subclass(kind, castas) return (castas*)u.dependency_object;
#endif

struct Value {
public:
	void Init ();

	Value ();
	Value (const Value& v);
	explicit Value (Type::Kind k);
	explicit Value (bool z);
	explicit Value (double d);
	explicit Value (gint32 i);
	explicit Value (guint32 i);
	Value (gunichar c, Type::Kind as); // for use with char values.
	Value (gint64 i, Type::Kind as); // Use for TimeSpan and int64 values.
	Value (Color c);
	Value (EventObject *obj);
	Value (FontFamily family);
	Value (FontSource source);
	Value (FontWeight weight);
	Value (FontStyle style);
	Value (FontStretch stretch);
	Value (PropertyPath propertypath);
	Value (Point pt);
	Value (Rect rect);
	Value (Size size);
	Value (Uri uri);
	Value (RepeatBehavior repeat);
	Value (Duration duration);
	Value (KeyTime keytime);
	Value (GridLength grid_length);
	Value (Thickness thickness);
	Value (CornerRadius radius);
	Value (ManagedTypeInfo type_info);
	Value (const char *s, bool take = false);
	Value (Point *points, int count);
	Value (double *values, int count);
	Value (Type::Kind, void *npobj);

	~Value ();

	// Use these to create Values with dependency objects with
	// a reference count of 1 (giving the ownership of the object
	// to Value).
	// Useful in cases like this:
	//   SetValue (SomeProperty, new DependencyObject ())
	// in which case we have to unref the newly created object.
	static Value* CreateUnrefPtr (EventObject* dob);
	static Value  CreateUnref (EventObject* dob);

	// essentially the same as the copy constructor, except it
	// does a deep copy of DependencyObjects.
	static Value* Clone (Value *v, Types *types = NULL);

	bool GetIsNull ();
	void SetIsNull (bool isNull);

	bool operator!= (const Value &v) const;
	bool operator== (const Value &v) const;

	Value& operator= (const Value& other);
	
	bool		Is (Deployment *deployment, Type::Kind type) { return Type::IsSubclassOf (deployment, k, type); }

	bool		AsBool ()	{ checked_get_exact (Type::BOOL, false, (bool)u.i32); }
	gunichar	AsChar ()       { checked_get_exact (Type::CHAR, 0, u.c); }
	double 		AsDouble ()	{ checked_get_exact (Type::DOUBLE, 0.0, u.d); }
	float 		AsFloat ()	{ checked_get_exact (Type::FLOAT, 0.0, u.f); }
	guint64		AsUInt64 ()	{ checked_get_exact (Type::UINT64, 0, u.ui64); }
	gint64		AsInt64 ()	{ checked_get_exact (Type::INT64, 0, u.i64); }
	TimeSpan	AsTimeSpan ()	{ checked_get_exact (Type::TIMESPAN, 0, (TimeSpan)u.i64); }
	guint32		AsUInt32 ()	{ checked_get_exact (Type::UINT32, 0, u.ui32); }
	gint32		AsInt32 ()	{ checked_get_exact (Type::INT32, 0, u.i32); }
	Color*		AsColor ()	{ checked_get_exact (Type::COLOR, NULL, u.color); }
	Point*		AsPoint ()	{ checked_get_exact (Type::POINT, NULL, u.point); }
	Uri*		AsUri ()	{ checked_get_exact (Type::URI, NULL, u.uri); }
	Rect*		AsRect ()	{ checked_get_exact (Type::RECT, NULL, u.rect); }
	Size*		AsSize ()	{ checked_get_exact (Type::SIZE, NULL, u.size); }
	FontFamily*	AsFontFamily ()	{ checked_get_exact (Type::FONTFAMILY, NULL, u.fontfamily); }
	FontWeight*	AsFontWeight ()	{ checked_get_exact (Type::FONTWEIGHT, NULL, u.fontweight); }
	FontStyle*	AsFontStyle ()	{ checked_get_exact (Type::FONTSTYLE, NULL, u.fontstyle); }
	FontStretch*	AsFontStretch() { checked_get_exact (Type::FONTSTRETCH, NULL, u.fontstretch); }
	FontSource*	AsFontSource ()	{ checked_get_exact (Type::FONTSOURCE, NULL, u.fontsource); }
	PropertyPath*	AsPropertyPath ()	{ checked_get_exact (Type::PROPERTYPATH, NULL, u.propertypath); }
	char*		AsString ()	{ checked_get_exact (Type::STRING, NULL, u.s); }
	DependencyProperty*		AsDependencyProperty ()	{ checked_get_exact (Type::DEPENDENCYPROPERTY, NULL, u.dp); }
	
	void *		AsManagedObject () { checked_get_exact (Type::MANAGED, NULL, u.managed_object); }
	void *		AsNPObj () { checked_get_exact (Type::NPOBJ, NULL, u.npobj); }
	
	RepeatBehavior*	AsRepeatBehavior ()	{ checked_get_exact (Type::REPEATBEHAVIOR, NULL, u.repeat); }
	Duration*	AsDuration ()	{ checked_get_exact (Type::DURATION, NULL, u.duration); }
	KeyTime*	AsKeyTime ()	{ checked_get_exact (Type::KEYTIME, NULL, u.keytime); }
	GridLength*     AsGridLength () { checked_get_exact (Type::GRIDLENGTH, NULL, u.grid_length); }
	Thickness*      AsThickness () { checked_get_exact (Type::THICKNESS, NULL, u.thickness); }
	CornerRadius*   AsCornerRadius () { checked_get_exact (Type::CORNERRADIUS, NULL, u.corner); }
	ManagedTypeInfo* AsManagedTypeInfo () { checked_get_exact (Type::MANAGEDTYPEINFO, NULL, u.type_info); }
	/* nullable primitives (all but bool) */
	double*		AsNullableDouble ()	{ checked_get_exact (Type::DOUBLE, NULL, &u.d); }
	guint64*	AsNullableUint64 ()	{ checked_get_exact (Type::UINT64, NULL, &u.ui64); }
	gint64* 	AsNullableInt64 ()	{ checked_get_exact (Type::INT64, NULL, &u.i64); }
	gint32* 	AsNullableInt32 ()	{ checked_get_exact (Type::INT32, NULL, &u.i32); }
	
	Accessibility*                           AsAccessibility (Types *types = NULL) { checked_get_subclass (Type::ACCESSIBILITY, Accessibility) }
	AlsaSource*                              AsAlsaSource (Types *types = NULL) { checked_get_subclass (Type::ALSASOURCE, AlsaSource) }
	Animation*                               AsAnimation (Types *types = NULL) { checked_get_subclass (Type::ANIMATION, Animation) }
	AnimationClock*                          AsAnimationClock (Types *types = NULL) { checked_get_subclass (Type::ANIMATIONCLOCK, AnimationClock) }
	Application*                             AsApplication (Types *types = NULL) { checked_get_subclass (Type::APPLICATION, Application) }
	ArcSegment*                              AsArcSegment (Types *types = NULL) { checked_get_subclass (Type::ARCSEGMENT, ArcSegment) }
	ASFDemuxer*                              AsASFDemuxer (Types *types = NULL) { checked_get_subclass (Type::ASFDEMUXER, ASFDemuxer) }
	ASFMarkerDecoder*                        AsASFMarkerDecoder (Types *types = NULL) { checked_get_subclass (Type::ASFMARKERDECODER, ASFMarkerDecoder) }
	ASFPacket*                               AsASFPacket (Types *types = NULL) { checked_get_subclass (Type::ASFPACKET, ASFPacket) }
	ASFParser*                               AsASFParser (Types *types = NULL) { checked_get_subclass (Type::ASFPARSER, ASFParser) }
	AssemblyPart*                            AsAssemblyPart (Types *types = NULL) { checked_get_subclass (Type::ASSEMBLYPART, AssemblyPart) }
	AssemblyPartCollection*                  AsAssemblyPartCollection (Types *types = NULL) { checked_get_subclass (Type::ASSEMBLYPART_COLLECTION, AssemblyPartCollection) }
	ASXDemuxer*                              AsASXDemuxer (Types *types = NULL) { checked_get_subclass (Type::ASXDEMUXER, ASXDemuxer) }
	AudioSource*                             AsAudioSource (Types *types = NULL) { checked_get_subclass (Type::AUDIOSOURCE, AudioSource) }
	AudioStream*                             AsAudioStream (Types *types = NULL) { checked_get_subclass (Type::AUDIOSTREAM, AudioStream) }
	BackEase*                                AsBackEase (Types *types = NULL) { checked_get_subclass (Type::BACKEASE, BackEase) }
	BeginStoryboard*                         AsBeginStoryboard (Types *types = NULL) { checked_get_subclass (Type::BEGINSTORYBOARD, BeginStoryboard) }
	BezierSegment*                           AsBezierSegment (Types *types = NULL) { checked_get_subclass (Type::BEZIERSEGMENT, BezierSegment) }
	BitmapCache*                             AsBitmapCache (Types *types = NULL) { checked_get_subclass (Type::BITMAPCACHE, BitmapCache) }
	BitmapImage*                             AsBitmapImage (Types *types = NULL) { checked_get_subclass (Type::BITMAPIMAGE, BitmapImage) }
	BitmapSource*                            AsBitmapSource (Types *types = NULL) { checked_get_subclass (Type::BITMAPSOURCE, BitmapSource) }
	BlurEffect*                              AsBlurEffect (Types *types = NULL) { checked_get_subclass (Type::BLUREFFECT, BlurEffect) }
	Border*                                  AsBorder (Types *types = NULL) { checked_get_subclass (Type::BORDER, Border) }
	BounceEase*                              AsBounceEase (Types *types = NULL) { checked_get_subclass (Type::BOUNCEEASE, BounceEase) }
	Brush*                                   AsBrush (Types *types = NULL) { checked_get_subclass (Type::BRUSH, Brush) }
	CacheMode*                               AsCacheMode (Types *types = NULL) { checked_get_subclass (Type::CACHEMODE, CacheMode) }
	Canvas*                                  AsCanvas (Types *types = NULL) { checked_get_subclass (Type::CANVAS, Canvas) }
	CircleEase*                              AsCircleEase (Types *types = NULL) { checked_get_subclass (Type::CIRCLEEASE, CircleEase) }
	Clock*                                   AsClock (Types *types = NULL) { checked_get_subclass (Type::CLOCK, Clock) }
	ClockGroup*                              AsClockGroup (Types *types = NULL) { checked_get_subclass (Type::CLOCKGROUP, ClockGroup) }
	CodecDownloader*                         AsCodecDownloader (Types *types = NULL) { checked_get_subclass (Type::CODECDOWNLOADER, CodecDownloader) }
	Collection*                              AsCollection (Types *types = NULL) { checked_get_subclass (Type::COLLECTION, Collection) }
	CollectionChangedEventArgs*              AsCollectionChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::COLLECTIONCHANGEDEVENTARGS, CollectionChangedEventArgs) }
	CollectionItemChangedEventArgs*          AsCollectionItemChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::COLLECTIONITEMCHANGEDEVENTARGS, CollectionItemChangedEventArgs) }
	ColorAnimation*                          AsColorAnimation (Types *types = NULL) { checked_get_subclass (Type::COLORANIMATION, ColorAnimation) }
	ColorAnimationUsingKeyFrames*            AsColorAnimationUsingKeyFrames (Types *types = NULL) { checked_get_subclass (Type::COLORANIMATIONUSINGKEYFRAMES, ColorAnimationUsingKeyFrames) }
	ColorKeyFrame*                           AsColorKeyFrame (Types *types = NULL) { checked_get_subclass (Type::COLORKEYFRAME, ColorKeyFrame) }
	ColorKeyFrameCollection*                 AsColorKeyFrameCollection (Types *types = NULL) { checked_get_subclass (Type::COLORKEYFRAME_COLLECTION, ColorKeyFrameCollection) }
	ColumnDefinition*                        AsColumnDefinition (Types *types = NULL) { checked_get_subclass (Type::COLUMNDEFINITION, ColumnDefinition) }
	ColumnDefinitionCollection*              AsColumnDefinitionCollection (Types *types = NULL) { checked_get_subclass (Type::COLUMNDEFINITION_COLLECTION, ColumnDefinitionCollection) }
	ContentChangedEventArgs*                 AsContentChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::CONTENTCHANGEDEVENTARGS, ContentChangedEventArgs) }
	ContentControl*                          AsContentControl (Types *types = NULL) { checked_get_subclass (Type::CONTENTCONTROL, ContentControl) }
	Control*                                 AsControl (Types *types = NULL) { checked_get_subclass (Type::CONTROL, Control) }
	ControlTemplate*                         AsControlTemplate (Types *types = NULL) { checked_get_subclass (Type::CONTROLTEMPLATE, ControlTemplate) }
	CubicEase*                               AsCubicEase (Types *types = NULL) { checked_get_subclass (Type::CUBICEASE, CubicEase) }
	CursorPositionChangedEventArgs*          AsCursorPositionChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::CURSORPOSITIONCHANGEDEVENTARGS, CursorPositionChangedEventArgs) }
	DataTemplate*                            AsDataTemplate (Types *types = NULL) { checked_get_subclass (Type::DATATEMPLATE, DataTemplate) }
	DeepZoomImageTileSource*                 AsDeepZoomImageTileSource (Types *types = NULL) { checked_get_subclass (Type::DEEPZOOMIMAGETILESOURCE, DeepZoomImageTileSource) }
	DependencyObject*                        AsDependencyObject (Types *types = NULL) { checked_get_subclass (Type::DEPENDENCY_OBJECT, DependencyObject) }
	DependencyObjectCollection*              AsDependencyObjectCollection (Types *types = NULL) { checked_get_subclass (Type::DEPENDENCY_OBJECT_COLLECTION, DependencyObjectCollection) }
	Deployment*                              AsDeployment (Types *types = NULL) { checked_get_subclass (Type::DEPLOYMENT, Deployment) }
	DiscreteColorKeyFrame*                   AsDiscreteColorKeyFrame (Types *types = NULL) { checked_get_subclass (Type::DISCRETECOLORKEYFRAME, DiscreteColorKeyFrame) }
	DiscreteDoubleKeyFrame*                  AsDiscreteDoubleKeyFrame (Types *types = NULL) { checked_get_subclass (Type::DISCRETEDOUBLEKEYFRAME, DiscreteDoubleKeyFrame) }
	DiscreteObjectKeyFrame*                  AsDiscreteObjectKeyFrame (Types *types = NULL) { checked_get_subclass (Type::DISCRETEOBJECTKEYFRAME, DiscreteObjectKeyFrame) }
	DiscretePointKeyFrame*                   AsDiscretePointKeyFrame (Types *types = NULL) { checked_get_subclass (Type::DISCRETEPOINTKEYFRAME, DiscretePointKeyFrame) }
	DispatcherTimer*                         AsDispatcherTimer (Types *types = NULL) { checked_get_subclass (Type::DISPATCHERTIMER, DispatcherTimer) }
	DoubleCollection*                        AsDoubleCollection (Types *types = NULL) { checked_get_subclass (Type::DOUBLE_COLLECTION, DoubleCollection) }
	DoubleAnimation*                         AsDoubleAnimation (Types *types = NULL) { checked_get_subclass (Type::DOUBLEANIMATION, DoubleAnimation) }
	DoubleAnimationUsingKeyFrames*           AsDoubleAnimationUsingKeyFrames (Types *types = NULL) { checked_get_subclass (Type::DOUBLEANIMATIONUSINGKEYFRAMES, DoubleAnimationUsingKeyFrames) }
	DoubleKeyFrame*                          AsDoubleKeyFrame (Types *types = NULL) { checked_get_subclass (Type::DOUBLEKEYFRAME, DoubleKeyFrame) }
	DoubleKeyFrameCollection*                AsDoubleKeyFrameCollection (Types *types = NULL) { checked_get_subclass (Type::DOUBLEKEYFRAME_COLLECTION, DoubleKeyFrameCollection) }
	Downloader*                              AsDownloader (Types *types = NULL) { checked_get_subclass (Type::DOWNLOADER, Downloader) }
	DownloadProgressEventArgs*               AsDownloadProgressEventArgs (Types *types = NULL) { checked_get_subclass (Type::DOWNLOADPROGRESSEVENTARGS, DownloadProgressEventArgs) }
	DrawingAttributes*                       AsDrawingAttributes (Types *types = NULL) { checked_get_subclass (Type::DRAWINGATTRIBUTES, DrawingAttributes) }
	DropShadowEffect*                        AsDropShadowEffect (Types *types = NULL) { checked_get_subclass (Type::DROPSHADOWEFFECT, DropShadowEffect) }
	EasingColorKeyFrame*                     AsEasingColorKeyFrame (Types *types = NULL) { checked_get_subclass (Type::EASINGCOLORKEYFRAME, EasingColorKeyFrame) }
	EasingDoubleKeyFrame*                    AsEasingDoubleKeyFrame (Types *types = NULL) { checked_get_subclass (Type::EASINGDOUBLEKEYFRAME, EasingDoubleKeyFrame) }
	EasingFunctionBase*                      AsEasingFunctionBase (Types *types = NULL) { checked_get_subclass (Type::EASINGFUNCTIONBASE, EasingFunctionBase) }
	EasingPointKeyFrame*                     AsEasingPointKeyFrame (Types *types = NULL) { checked_get_subclass (Type::EASINGPOINTKEYFRAME, EasingPointKeyFrame) }
	Effect*                                  AsEffect (Types *types = NULL) { checked_get_subclass (Type::EFFECT, Effect) }
	ElasticEase*                             AsElasticEase (Types *types = NULL) { checked_get_subclass (Type::ELASTICEASE, ElasticEase) }
	Ellipse*                                 AsEllipse (Types *types = NULL) { checked_get_subclass (Type::ELLIPSE, Ellipse) }
	EllipseGeometry*                         AsEllipseGeometry (Types *types = NULL) { checked_get_subclass (Type::ELLIPSEGEOMETRY, EllipseGeometry) }
	ErrorEventArgs*                          AsErrorEventArgs (Types *types = NULL) { checked_get_subclass (Type::ERROREVENTARGS, ErrorEventArgs) }
	EventArgs*                               AsEventArgs (Types *types = NULL) { checked_get_subclass (Type::EVENTARGS, EventArgs) }
	EventListenerProxy*                      AsEventListenerProxy (Types *types = NULL) { checked_get_subclass (Type::EVENTLISTENERPROXY, EventListenerProxy) }
	EventObject*                             AsEventObject (Types *types = NULL) { checked_get_subclass (Type::EVENTOBJECT, EventObject) }
	EventTrigger*                            AsEventTrigger (Types *types = NULL) { checked_get_subclass (Type::EVENTTRIGGER, EventTrigger) }
	ExponentialEase*                         AsExponentialEase (Types *types = NULL) { checked_get_subclass (Type::EXPONENTIALEASE, ExponentialEase) }
	ExtensionPart*                           AsExtensionPart (Types *types = NULL) { checked_get_subclass (Type::EXTENSIONPART, ExtensionPart) }
	ExternalDecoder*                         AsExternalDecoder (Types *types = NULL) { checked_get_subclass (Type::EXTERNALDECODER, ExternalDecoder) }
	ExternalDemuxer*                         AsExternalDemuxer (Types *types = NULL) { checked_get_subclass (Type::EXTERNALDEMUXER, ExternalDemuxer) }
	ExternalPart*                            AsExternalPart (Types *types = NULL) { checked_get_subclass (Type::EXTERNALPART, ExternalPart) }
	ExternalPartCollection*                  AsExternalPartCollection (Types *types = NULL) { checked_get_subclass (Type::EXTERNALPART_COLLECTION, ExternalPartCollection) }
	FfmpegDecoder*                           AsFfmpegDecoder (Types *types = NULL) { checked_get_subclass (Type::FFMPEGDECODER, FfmpegDecoder) }
	FfmpegDemuxer*                           AsFfmpegDemuxer (Types *types = NULL) { checked_get_subclass (Type::FFMPEGDEMUXER, FfmpegDemuxer) }
	FileDownloader*                          AsFileDownloader (Types *types = NULL) { checked_get_subclass (Type::FILEDOWNLOADER, FileDownloader) }
	FileSource*                              AsFileSource (Types *types = NULL) { checked_get_subclass (Type::FILESOURCE, FileSource) }
	FrameworkElement*                        AsFrameworkElement (Types *types = NULL) { checked_get_subclass (Type::FRAMEWORKELEMENT, FrameworkElement) }
	FrameworkTemplate*                       AsFrameworkTemplate (Types *types = NULL) { checked_get_subclass (Type::FRAMEWORKTEMPLATE, FrameworkTemplate) }
	GeneralTransform*                        AsGeneralTransform (Types *types = NULL) { checked_get_subclass (Type::GENERALTRANSFORM, GeneralTransform) }
	Geometry*                                AsGeometry (Types *types = NULL) { checked_get_subclass (Type::GEOMETRY, Geometry) }
	GeometryCollection*                      AsGeometryCollection (Types *types = NULL) { checked_get_subclass (Type::GEOMETRY_COLLECTION, GeometryCollection) }
	GeometryGroup*                           AsGeometryGroup (Types *types = NULL) { checked_get_subclass (Type::GEOMETRYGROUP, GeometryGroup) }
	Glyphs*                                  AsGlyphs (Types *types = NULL) { checked_get_subclass (Type::GLYPHS, Glyphs) }
	GradientBrush*                           AsGradientBrush (Types *types = NULL) { checked_get_subclass (Type::GRADIENTBRUSH, GradientBrush) }
	GradientStop*                            AsGradientStop (Types *types = NULL) { checked_get_subclass (Type::GRADIENTSTOP, GradientStop) }
	GradientStopCollection*                  AsGradientStopCollection (Types *types = NULL) { checked_get_subclass (Type::GRADIENTSTOP_COLLECTION, GradientStopCollection) }
	Grid*                                    AsGrid (Types *types = NULL) { checked_get_subclass (Type::GRID, Grid) }
	HitTestCollection*                       AsHitTestCollection (Types *types = NULL) { checked_get_subclass (Type::HITTEST_COLLECTION, HitTestCollection) }
	Icon*                                    AsIcon (Types *types = NULL) { checked_get_subclass (Type::ICON, Icon) }
	IconCollection*                          AsIconCollection (Types *types = NULL) { checked_get_subclass (Type::ICON_COLLECTION, IconCollection) }
	IImageConverter*                         AsIImageConverter (Types *types = NULL) { checked_get_subclass (Type::IIMAGECONVERTER, IImageConverter) }
	Image*                                   AsImage (Types *types = NULL) { checked_get_subclass (Type::IMAGE, Image) }
	ImageBrush*                              AsImageBrush (Types *types = NULL) { checked_get_subclass (Type::IMAGEBRUSH, ImageBrush) }
	ImageErrorEventArgs*                     AsImageErrorEventArgs (Types *types = NULL) { checked_get_subclass (Type::IMAGEERROREVENTARGS, ImageErrorEventArgs) }
	ImageSource*                             AsImageSource (Types *types = NULL) { checked_get_subclass (Type::IMAGESOURCE, ImageSource) }
	IMediaDecoder*                           AsIMediaDecoder (Types *types = NULL) { checked_get_subclass (Type::IMEDIADECODER, IMediaDecoder) }
	IMediaDemuxer*                           AsIMediaDemuxer (Types *types = NULL) { checked_get_subclass (Type::IMEDIADEMUXER, IMediaDemuxer) }
	IMediaObject*                            AsIMediaObject (Types *types = NULL) { checked_get_subclass (Type::IMEDIAOBJECT, IMediaObject) }
	IMediaSource*                            AsIMediaSource (Types *types = NULL) { checked_get_subclass (Type::IMEDIASOURCE, IMediaSource) }
	IMediaStream*                            AsIMediaStream (Types *types = NULL) { checked_get_subclass (Type::IMEDIASTREAM, IMediaStream) }
	InkPresenter*                            AsInkPresenter (Types *types = NULL) { checked_get_subclass (Type::INKPRESENTER, InkPresenter) }
	Inline*                                  AsInline (Types *types = NULL) { checked_get_subclass (Type::INLINE, Inline) }
	InlineCollection*                        AsInlineCollection (Types *types = NULL) { checked_get_subclass (Type::INLINE_COLLECTION, InlineCollection) }
	InputMethod*                             AsInputMethod (Types *types = NULL) { checked_get_subclass (Type::INPUTMETHOD, InputMethod) }
	InternalDownloader*                      AsInternalDownloader (Types *types = NULL) { checked_get_subclass (Type::INTERNALDOWNLOADER, InternalDownloader) }
	ItemCollection*                          AsItemCollection (Types *types = NULL) { checked_get_subclass (Type::ITEM_COLLECTION, ItemCollection) }
	KeyEventArgs*                            AsKeyEventArgs (Types *types = NULL) { checked_get_subclass (Type::KEYEVENTARGS, KeyEventArgs) }
	KeyFrame*                                AsKeyFrame (Types *types = NULL) { checked_get_subclass (Type::KEYFRAME, KeyFrame) }
	KeyFrameCollection*                      AsKeyFrameCollection (Types *types = NULL) { checked_get_subclass (Type::KEYFRAME_COLLECTION, KeyFrameCollection) }
	KeySpline*                               AsKeySpline (Types *types = NULL) { checked_get_subclass (Type::KEYSPLINE, KeySpline) }
	LayoutInformation*                       AsLayoutInformation (Types *types = NULL) { checked_get_subclass (Type::LAYOUTINFORMATION, LayoutInformation) }
	Line*                                    AsLine (Types *types = NULL) { checked_get_subclass (Type::LINE, Line) }
	LinearColorKeyFrame*                     AsLinearColorKeyFrame (Types *types = NULL) { checked_get_subclass (Type::LINEARCOLORKEYFRAME, LinearColorKeyFrame) }
	LinearDoubleKeyFrame*                    AsLinearDoubleKeyFrame (Types *types = NULL) { checked_get_subclass (Type::LINEARDOUBLEKEYFRAME, LinearDoubleKeyFrame) }
	LinearGradientBrush*                     AsLinearGradientBrush (Types *types = NULL) { checked_get_subclass (Type::LINEARGRADIENTBRUSH, LinearGradientBrush) }
	LinearPointKeyFrame*                     AsLinearPointKeyFrame (Types *types = NULL) { checked_get_subclass (Type::LINEARPOINTKEYFRAME, LinearPointKeyFrame) }
	LineBreak*                               AsLineBreak (Types *types = NULL) { checked_get_subclass (Type::LINEBREAK, LineBreak) }
	LineGeometry*                            AsLineGeometry (Types *types = NULL) { checked_get_subclass (Type::LINEGEOMETRY, LineGeometry) }
	LineSegment*                             AsLineSegment (Types *types = NULL) { checked_get_subclass (Type::LINESEGMENT, LineSegment) }
	LogReadyRoutedEventArgs*                 AsLogReadyRoutedEventArgs (Types *types = NULL) { checked_get_subclass (Type::LOGREADYROUTEDEVENTARGS, LogReadyRoutedEventArgs) }
	ManagedStreamSource*                     AsManagedStreamSource (Types *types = NULL) { checked_get_subclass (Type::MANAGEDSTREAMSOURCE, ManagedStreamSource) }
	ManualTimeSource*                        AsManualTimeSource (Types *types = NULL) { checked_get_subclass (Type::MANUALTIMESOURCE, ManualTimeSource) }
	MarkerStream*                            AsMarkerStream (Types *types = NULL) { checked_get_subclass (Type::MARKERSTREAM, MarkerStream) }
	Matrix*                                  AsMatrix (Types *types = NULL) { checked_get_subclass (Type::MATRIX, Matrix) }
	Matrix3D*                                AsMatrix3D (Types *types = NULL) { checked_get_subclass (Type::MATRIX3D, Matrix3D) }
	Matrix3DProjection*                      AsMatrix3DProjection (Types *types = NULL) { checked_get_subclass (Type::MATRIX3DPROJECTION, Matrix3DProjection) }
	MatrixTransform*                         AsMatrixTransform (Types *types = NULL) { checked_get_subclass (Type::MATRIXTRANSFORM, MatrixTransform) }
	Media*                                   AsMedia (Types *types = NULL) { checked_get_subclass (Type::MEDIA, Media) }
	MediaAttribute*                          AsMediaAttribute (Types *types = NULL) { checked_get_subclass (Type::MEDIAATTRIBUTE, MediaAttribute) }
	MediaAttributeCollection*                AsMediaAttributeCollection (Types *types = NULL) { checked_get_subclass (Type::MEDIAATTRIBUTE_COLLECTION, MediaAttributeCollection) }
	MediaBase*                               AsMediaBase (Types *types = NULL) { checked_get_subclass (Type::MEDIABASE, MediaBase) }
	MediaClosure*                            AsMediaClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIACLOSURE, MediaClosure) }
	MediaDisposeObjectClosure*               AsMediaDisposeObjectClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIADISPOSEOBJECTCLOSURE, MediaDisposeObjectClosure) }
	MediaElement*                            AsMediaElement (Types *types = NULL) { checked_get_subclass (Type::MEDIAELEMENT, MediaElement) }
	MediaFrame*                              AsMediaFrame (Types *types = NULL) { checked_get_subclass (Type::MEDIAFRAME, MediaFrame) }
	MediaGetFrameClosure*                    AsMediaGetFrameClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIAGETFRAMECLOSURE, MediaGetFrameClosure) }
	MediaMarker*                             AsMediaMarker (Types *types = NULL) { checked_get_subclass (Type::MEDIAMARKER, MediaMarker) }
	MediaMarkerFoundClosure*                 AsMediaMarkerFoundClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIAMARKERFOUNDCLOSURE, MediaMarkerFoundClosure) }
	MediaPlayer*                             AsMediaPlayer (Types *types = NULL) { checked_get_subclass (Type::MEDIAPLAYER, MediaPlayer) }
	MediaReportFrameCompletedClosure*        AsMediaReportFrameCompletedClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIAREPORTFRAMECOMPLETEDCLOSURE, MediaReportFrameCompletedClosure) }
	MediaReportSeekCompletedClosure*         AsMediaReportSeekCompletedClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIAREPORTSEEKCOMPLETEDCLOSURE, MediaReportSeekCompletedClosure) }
	MediaSeekClosure*                        AsMediaSeekClosure (Types *types = NULL) { checked_get_subclass (Type::MEDIASEEKCLOSURE, MediaSeekClosure) }
	MemorySource*                            AsMemorySource (Types *types = NULL) { checked_get_subclass (Type::MEMORYSOURCE, MemorySource) }
	MmsDemuxer*                              AsMmsDemuxer (Types *types = NULL) { checked_get_subclass (Type::MMSDEMUXER, MmsDemuxer) }
	MmsDownloader*                           AsMmsDownloader (Types *types = NULL) { checked_get_subclass (Type::MMSDOWNLOADER, MmsDownloader) }
	MmsPlaylistEntry*                        AsMmsPlaylistEntry (Types *types = NULL) { checked_get_subclass (Type::MMSPLAYLISTENTRY, MmsPlaylistEntry) }
	MmsSecondDownloader*                     AsMmsSecondDownloader (Types *types = NULL) { checked_get_subclass (Type::MMSSECONDDOWNLOADER, MmsSecondDownloader) }
	MmsSource*                               AsMmsSource (Types *types = NULL) { checked_get_subclass (Type::MMSSOURCE, MmsSource) }
	MouseButtonEventArgs*                    AsMouseButtonEventArgs (Types *types = NULL) { checked_get_subclass (Type::MOUSEBUTTONEVENTARGS, MouseButtonEventArgs) }
	MouseEventArgs*                          AsMouseEventArgs (Types *types = NULL) { checked_get_subclass (Type::MOUSEEVENTARGS, MouseEventArgs) }
	MouseWheelEventArgs*                     AsMouseWheelEventArgs (Types *types = NULL) { checked_get_subclass (Type::MOUSEWHEELEVENTARGS, MouseWheelEventArgs) }
	Mp3Demuxer*                              AsMp3Demuxer (Types *types = NULL) { checked_get_subclass (Type::MP3DEMUXER, Mp3Demuxer) }
	MultiScaleImage*                         AsMultiScaleImage (Types *types = NULL) { checked_get_subclass (Type::MULTISCALEIMAGE, MultiScaleImage) }
	MultiScaleSubImage*                      AsMultiScaleSubImage (Types *types = NULL) { checked_get_subclass (Type::MULTISCALESUBIMAGE, MultiScaleSubImage) }
	MultiScaleSubImageCollection*            AsMultiScaleSubImageCollection (Types *types = NULL) { checked_get_subclass (Type::MULTISCALESUBIMAGE_COLLECTION, MultiScaleSubImageCollection) }
	MultiScaleTileSource*                    AsMultiScaleTileSource (Types *types = NULL) { checked_get_subclass (Type::MULTISCALETILESOURCE, MultiScaleTileSource) }
	NameScope*                               AsNameScope (Types *types = NULL) { checked_get_subclass (Type::NAMESCOPE, NameScope) }
	NullDecoder*                             AsNullDecoder (Types *types = NULL) { checked_get_subclass (Type::NULLDECODER, NullDecoder) }
	ObjectAnimationUsingKeyFrames*           AsObjectAnimationUsingKeyFrames (Types *types = NULL) { checked_get_subclass (Type::OBJECTANIMATIONUSINGKEYFRAMES, ObjectAnimationUsingKeyFrames) }
	ObjectKeyFrame*                          AsObjectKeyFrame (Types *types = NULL) { checked_get_subclass (Type::OBJECTKEYFRAME, ObjectKeyFrame) }
	ObjectKeyFrameCollection*                AsObjectKeyFrameCollection (Types *types = NULL) { checked_get_subclass (Type::OBJECTKEYFRAME_COLLECTION, ObjectKeyFrameCollection) }
	OutOfBrowserSettings*                    AsOutOfBrowserSettings (Types *types = NULL) { checked_get_subclass (Type::OUTOFBROWSERSETTINGS, OutOfBrowserSettings) }
	Panel*                                   AsPanel (Types *types = NULL) { checked_get_subclass (Type::PANEL, Panel) }
	ParallelTimeline*                        AsParallelTimeline (Types *types = NULL) { checked_get_subclass (Type::PARALLELTIMELINE, ParallelTimeline) }
	ParserErrorEventArgs*                    AsParserErrorEventArgs (Types *types = NULL) { checked_get_subclass (Type::PARSERERROREVENTARGS, ParserErrorEventArgs) }
	PassThroughDecoder*                      AsPassThroughDecoder (Types *types = NULL) { checked_get_subclass (Type::PASSTHROUGHDECODER, PassThroughDecoder) }
	PasswordBox*                             AsPasswordBox (Types *types = NULL) { checked_get_subclass (Type::PASSWORDBOX, PasswordBox) }
	Path*                                    AsPath (Types *types = NULL) { checked_get_subclass (Type::PATH, Path) }
	PathFigure*                              AsPathFigure (Types *types = NULL) { checked_get_subclass (Type::PATHFIGURE, PathFigure) }
	PathFigureCollection*                    AsPathFigureCollection (Types *types = NULL) { checked_get_subclass (Type::PATHFIGURE_COLLECTION, PathFigureCollection) }
	PathGeometry*                            AsPathGeometry (Types *types = NULL) { checked_get_subclass (Type::PATHGEOMETRY, PathGeometry) }
	PathSegment*                             AsPathSegment (Types *types = NULL) { checked_get_subclass (Type::PATHSEGMENT, PathSegment) }
	PathSegmentCollection*                   AsPathSegmentCollection (Types *types = NULL) { checked_get_subclass (Type::PATHSEGMENT_COLLECTION, PathSegmentCollection) }
	PixelShader*                             AsPixelShader (Types *types = NULL) { checked_get_subclass (Type::PIXELSHADER, PixelShader) }
	PlaneProjection*                         AsPlaneProjection (Types *types = NULL) { checked_get_subclass (Type::PLANEPROJECTION, PlaneProjection) }
	Playlist*                                AsPlaylist (Types *types = NULL) { checked_get_subclass (Type::PLAYLIST, Playlist) }
	PlaylistEntry*                           AsPlaylistEntry (Types *types = NULL) { checked_get_subclass (Type::PLAYLISTENTRY, PlaylistEntry) }
	PlaylistRoot*                            AsPlaylistRoot (Types *types = NULL) { checked_get_subclass (Type::PLAYLISTROOT, PlaylistRoot) }
	PointCollection*                         AsPointCollection (Types *types = NULL) { checked_get_subclass (Type::POINT_COLLECTION, PointCollection) }
	PointAnimation*                          AsPointAnimation (Types *types = NULL) { checked_get_subclass (Type::POINTANIMATION, PointAnimation) }
	PointAnimationUsingKeyFrames*            AsPointAnimationUsingKeyFrames (Types *types = NULL) { checked_get_subclass (Type::POINTANIMATIONUSINGKEYFRAMES, PointAnimationUsingKeyFrames) }
	PointKeyFrame*                           AsPointKeyFrame (Types *types = NULL) { checked_get_subclass (Type::POINTKEYFRAME, PointKeyFrame) }
	PointKeyFrameCollection*                 AsPointKeyFrameCollection (Types *types = NULL) { checked_get_subclass (Type::POINTKEYFRAME_COLLECTION, PointKeyFrameCollection) }
	PolyBezierSegment*                       AsPolyBezierSegment (Types *types = NULL) { checked_get_subclass (Type::POLYBEZIERSEGMENT, PolyBezierSegment) }
	Polygon*                                 AsPolygon (Types *types = NULL) { checked_get_subclass (Type::POLYGON, Polygon) }
	Polyline*                                AsPolyline (Types *types = NULL) { checked_get_subclass (Type::POLYLINE, Polyline) }
	PolyLineSegment*                         AsPolyLineSegment (Types *types = NULL) { checked_get_subclass (Type::POLYLINESEGMENT, PolyLineSegment) }
	PolyQuadraticBezierSegment*              AsPolyQuadraticBezierSegment (Types *types = NULL) { checked_get_subclass (Type::POLYQUADRATICBEZIERSEGMENT, PolyQuadraticBezierSegment) }
	Popup*                                   AsPopup (Types *types = NULL) { checked_get_subclass (Type::POPUP, Popup) }
	PowerEase*                               AsPowerEase (Types *types = NULL) { checked_get_subclass (Type::POWEREASE, PowerEase) }
	ProgressEventArgs*                       AsProgressEventArgs (Types *types = NULL) { checked_get_subclass (Type::PROGRESSEVENTARGS, ProgressEventArgs) }
	ProgressiveSource*                       AsProgressiveSource (Types *types = NULL) { checked_get_subclass (Type::PROGRESSIVESOURCE, ProgressiveSource) }
	Projection*                              AsProjection (Types *types = NULL) { checked_get_subclass (Type::PROJECTION, Projection) }
	PropertyChangedEventArgs*                AsPropertyChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::PROPERTYCHANGEDEVENTARGS, PropertyChangedEventArgs) }
	PulseSource*                             AsPulseSource (Types *types = NULL) { checked_get_subclass (Type::PULSESOURCE, PulseSource) }
	QuadraticBezierSegment*                  AsQuadraticBezierSegment (Types *types = NULL) { checked_get_subclass (Type::QUADRATICBEZIERSEGMENT, QuadraticBezierSegment) }
	QuadraticEase*                           AsQuadraticEase (Types *types = NULL) { checked_get_subclass (Type::QUADRATICEASE, QuadraticEase) }
	QuarticEase*                             AsQuarticEase (Types *types = NULL) { checked_get_subclass (Type::QUARTICEASE, QuarticEase) }
	QuinticEase*                             AsQuinticEase (Types *types = NULL) { checked_get_subclass (Type::QUINTICEASE, QuinticEase) }
	RadialGradientBrush*                     AsRadialGradientBrush (Types *types = NULL) { checked_get_subclass (Type::RADIALGRADIENTBRUSH, RadialGradientBrush) }
	Rectangle*                               AsRectangle (Types *types = NULL) { checked_get_subclass (Type::RECTANGLE, Rectangle) }
	RectangleGeometry*                       AsRectangleGeometry (Types *types = NULL) { checked_get_subclass (Type::RECTANGLEGEOMETRY, RectangleGeometry) }
	RenderingEventArgs*                      AsRenderingEventArgs (Types *types = NULL) { checked_get_subclass (Type::RENDERINGEVENTARGS, RenderingEventArgs) }
	ResourceDictionary*                      AsResourceDictionary (Types *types = NULL) { checked_get_subclass (Type::RESOURCE_DICTIONARY, ResourceDictionary) }
	ResourceDictionaryCollection*            AsResourceDictionaryCollection (Types *types = NULL) { checked_get_subclass (Type::RESOURCE_DICTIONARY_COLLECTION, ResourceDictionaryCollection) }
	RotateTransform*                         AsRotateTransform (Types *types = NULL) { checked_get_subclass (Type::ROTATETRANSFORM, RotateTransform) }
	RoutedEventArgs*                         AsRoutedEventArgs (Types *types = NULL) { checked_get_subclass (Type::ROUTEDEVENTARGS, RoutedEventArgs) }
	RowDefinition*                           AsRowDefinition (Types *types = NULL) { checked_get_subclass (Type::ROWDEFINITION, RowDefinition) }
	RowDefinitionCollection*                 AsRowDefinitionCollection (Types *types = NULL) { checked_get_subclass (Type::ROWDEFINITION_COLLECTION, RowDefinitionCollection) }
	Run*                                     AsRun (Types *types = NULL) { checked_get_subclass (Type::RUN, Run) }
	ScaleTransform*                          AsScaleTransform (Types *types = NULL) { checked_get_subclass (Type::SCALETRANSFORM, ScaleTransform) }
	Setter*                                  AsSetter (Types *types = NULL) { checked_get_subclass (Type::SETTER, Setter) }
	SetterBase*                              AsSetterBase (Types *types = NULL) { checked_get_subclass (Type::SETTERBASE, SetterBase) }
	SetterBaseCollection*                    AsSetterBaseCollection (Types *types = NULL) { checked_get_subclass (Type::SETTERBASE_COLLECTION, SetterBaseCollection) }
	ShaderEffect*                            AsShaderEffect (Types *types = NULL) { checked_get_subclass (Type::SHADEREFFECT, ShaderEffect) }
	Shape*                                   AsShape (Types *types = NULL) { checked_get_subclass (Type::SHAPE, Shape) }
	SineEase*                                AsSineEase (Types *types = NULL) { checked_get_subclass (Type::SINEEASE, SineEase) }
	SizeChangedEventArgs*                    AsSizeChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::SIZECHANGEDEVENTARGS, SizeChangedEventArgs) }
	SkewTransform*                           AsSkewTransform (Types *types = NULL) { checked_get_subclass (Type::SKEWTRANSFORM, SkewTransform) }
	SolidColorBrush*                         AsSolidColorBrush (Types *types = NULL) { checked_get_subclass (Type::SOLIDCOLORBRUSH, SolidColorBrush) }
	SplineColorKeyFrame*                     AsSplineColorKeyFrame (Types *types = NULL) { checked_get_subclass (Type::SPLINECOLORKEYFRAME, SplineColorKeyFrame) }
	SplineDoubleKeyFrame*                    AsSplineDoubleKeyFrame (Types *types = NULL) { checked_get_subclass (Type::SPLINEDOUBLEKEYFRAME, SplineDoubleKeyFrame) }
	SplinePointKeyFrame*                     AsSplinePointKeyFrame (Types *types = NULL) { checked_get_subclass (Type::SPLINEPOINTKEYFRAME, SplinePointKeyFrame) }
	Storyboard*                              AsStoryboard (Types *types = NULL) { checked_get_subclass (Type::STORYBOARD, Storyboard) }
	Stroke*                                  AsStroke (Types *types = NULL) { checked_get_subclass (Type::STROKE, Stroke) }
	StrokeCollection*                        AsStrokeCollection (Types *types = NULL) { checked_get_subclass (Type::STROKE_COLLECTION, StrokeCollection) }
	Style*                                   AsStyle (Types *types = NULL) { checked_get_subclass (Type::STYLE, Style) }
	StylusInfo*                              AsStylusInfo (Types *types = NULL) { checked_get_subclass (Type::STYLUSINFO, StylusInfo) }
	StylusPoint*                             AsStylusPoint (Types *types = NULL) { checked_get_subclass (Type::STYLUSPOINT, StylusPoint) }
	StylusPointCollection*                   AsStylusPointCollection (Types *types = NULL) { checked_get_subclass (Type::STYLUSPOINT_COLLECTION, StylusPointCollection) }
	Surface*                                 AsSurface (Types *types = NULL) { checked_get_subclass (Type::SURFACE, Surface) }
	SystemTimeSource*                        AsSystemTimeSource (Types *types = NULL) { checked_get_subclass (Type::SYSTEMTIMESOURCE, SystemTimeSource) }
	TextBlock*                               AsTextBlock (Types *types = NULL) { checked_get_subclass (Type::TEXTBLOCK, TextBlock) }
	TextBox*                                 AsTextBox (Types *types = NULL) { checked_get_subclass (Type::TEXTBOX, TextBox) }
	TextBoxBase*                             AsTextBoxBase (Types *types = NULL) { checked_get_subclass (Type::TEXTBOXBASE, TextBoxBase) }
	TextBoxModelChangedEventArgs*            AsTextBoxModelChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::TEXTBOXMODELCHANGEDEVENTARGS, TextBoxModelChangedEventArgs) }
	TextBoxView*                             AsTextBoxView (Types *types = NULL) { checked_get_subclass (Type::TEXTBOXVIEW, TextBoxView) }
	TextChangedEventArgs*                    AsTextChangedEventArgs (Types *types = NULL) { checked_get_subclass (Type::TEXTCHANGEDEVENTARGS, TextChangedEventArgs) }
	TextOptions*                             AsTextOptions (Types *types = NULL) { checked_get_subclass (Type::TEXTOPTIONS, TextOptions) }
	TileBrush*                               AsTileBrush (Types *types = NULL) { checked_get_subclass (Type::TILEBRUSH, TileBrush) }
	Timeline*                                AsTimeline (Types *types = NULL) { checked_get_subclass (Type::TIMELINE, Timeline) }
	TimelineCollection*                      AsTimelineCollection (Types *types = NULL) { checked_get_subclass (Type::TIMELINE_COLLECTION, TimelineCollection) }
	TimelineGroup*                           AsTimelineGroup (Types *types = NULL) { checked_get_subclass (Type::TIMELINEGROUP, TimelineGroup) }
	TimelineMarker*                          AsTimelineMarker (Types *types = NULL) { checked_get_subclass (Type::TIMELINEMARKER, TimelineMarker) }
	TimelineMarkerCollection*                AsTimelineMarkerCollection (Types *types = NULL) { checked_get_subclass (Type::TIMELINEMARKER_COLLECTION, TimelineMarkerCollection) }
	TimelineMarkerRoutedEventArgs*           AsTimelineMarkerRoutedEventArgs (Types *types = NULL) { checked_get_subclass (Type::TIMELINEMARKERROUTEDEVENTARGS, TimelineMarkerRoutedEventArgs) }
	TimeManager*                             AsTimeManager (Types *types = NULL) { checked_get_subclass (Type::TIMEMANAGER, TimeManager) }
	TimeSource*                              AsTimeSource (Types *types = NULL) { checked_get_subclass (Type::TIMESOURCE, TimeSource) }
	TouchDevice*                             AsTouchDevice (Types *types = NULL) { checked_get_subclass (Type::TOUCHDEVICE, TouchDevice) }
	TouchPoint*                              AsTouchPoint (Types *types = NULL) { checked_get_subclass (Type::TOUCHPOINT, TouchPoint) }
	TouchPointCollection*                    AsTouchPointCollection (Types *types = NULL) { checked_get_subclass (Type::TOUCHPOINT_COLLECTION, TouchPointCollection) }
	Transform*                               AsTransform (Types *types = NULL) { checked_get_subclass (Type::TRANSFORM, Transform) }
	TransformCollection*                     AsTransformCollection (Types *types = NULL) { checked_get_subclass (Type::TRANSFORM_COLLECTION, TransformCollection) }
	TransformGroup*                          AsTransformGroup (Types *types = NULL) { checked_get_subclass (Type::TRANSFORMGROUP, TransformGroup) }
	TranslateTransform*                      AsTranslateTransform (Types *types = NULL) { checked_get_subclass (Type::TRANSLATETRANSFORM, TranslateTransform) }
	TriggerCollection*                       AsTriggerCollection (Types *types = NULL) { checked_get_subclass (Type::TRIGGER_COLLECTION, TriggerCollection) }
	TriggerAction*                           AsTriggerAction (Types *types = NULL) { checked_get_subclass (Type::TRIGGERACTION, TriggerAction) }
	TriggerActionCollection*                 AsTriggerActionCollection (Types *types = NULL) { checked_get_subclass (Type::TRIGGERACTION_COLLECTION, TriggerActionCollection) }
	TriggerBase*                             AsTriggerBase (Types *types = NULL) { checked_get_subclass (Type::TRIGGERBASE, TriggerBase) }
	UIElement*                               AsUIElement (Types *types = NULL) { checked_get_subclass (Type::UIELEMENT, UIElement) }
	UIElementCollection*                     AsUIElementCollection (Types *types = NULL) { checked_get_subclass (Type::UIELEMENT_COLLECTION, UIElementCollection) }
	UnmanagedMatrix*                         AsUnmanagedMatrix (Types *types = NULL) { checked_get_subclass (Type::UNMANAGEDMATRIX, UnmanagedMatrix) }
	UnmanagedMatrix3D*                       AsUnmanagedMatrix3D (Types *types = NULL) { checked_get_subclass (Type::UNMANAGEDMATRIX3D, UnmanagedMatrix3D) }
	UserControl*                             AsUserControl (Types *types = NULL) { checked_get_subclass (Type::USERCONTROL, UserControl) }
	VideoBrush*                              AsVideoBrush (Types *types = NULL) { checked_get_subclass (Type::VIDEOBRUSH, VideoBrush) }
	VideoStream*                             AsVideoStream (Types *types = NULL) { checked_get_subclass (Type::VIDEOSTREAM, VideoStream) }
	VisualBrush*                             AsVisualBrush (Types *types = NULL) { checked_get_subclass (Type::VISUALBRUSH, VisualBrush) }
	WindowSettings*                          AsWindowSettings (Types *types = NULL) { checked_get_subclass (Type::WINDOWSETTINGS, WindowSettings) }
	WriteableBitmap*                         AsWriteableBitmap (Types *types = NULL) { checked_get_subclass (Type::WRITEABLEBITMAP, WriteableBitmap) }
	YUVConverter*                            AsYUVConverter (Types *types = NULL) { checked_get_subclass (Type::YUVCONVERTER, YUVConverter) }

	
	char *ToString ();
	
  	Type::Kind GetKind ();
	
	void FreeValue ();
	
  private:
	Type::Kind k;
	
	gint32 padding;
	
	union {
		double d;
		float f;
		guint64 ui64;
		gint64 i64;
		guint32 ui32;
		gint32 i32;
		gunichar c;
		char *s;
		EventObject *dependency_object;
		Color *color;
		DependencyProperty *dp;
		Point *point;
		Uri *uri;
		Rect *rect;
		Size *size;
		FontFamily *fontfamily;
		FontSource *fontsource;
		FontWeight *fontweight;
		FontStretch *fontstretch;
		FontStyle *fontstyle;
		PropertyPath *propertypath;
		RepeatBehavior *repeat;
		Duration *duration;
		KeyTime *keytime;
		GridLength *grid_length;
		Thickness *thickness;
		CornerRadius *corner;
		ManagedTypeInfo *type_info;
		void *managed_object;
		void *npobj;
	} u;
	
	// You don't want to be using this ctor.  it's here to help
	// c++ recognize bad unspecified pointer args to Value ctors
	// (it normally converts them to bool, which we handle, so you
	// never see the error of your ways).  So do the world a
	// favor, and don't expose this ctor. :)
	Value (void *v) { }
	// You don't want to be using this ctor either.
	// Use the Value (gint64, Type::Kind) ctor
	// (Both for TimeSpan and int64_t)
	// This one is bad because it get used by either int64_t
	// and TimeSpan, and the constructor doesn't know which 
	// of the two types it is.
	explicit Value (gint64 i) {};

	void Copy (const Value& other);
	char *GetName ();
};

G_BEGIN_DECLS
/* @GeneratePInvoke */
void value_free_value (Value *value);
/* @GeneratePInvoke */
void value_free_value2 (/* @MarshalAs=IntPtr */ Value *value);
G_END_DECLS


#endif /* MOON_VALUE_H */
