protected void GenerateValueExtractor(RgacUDT udt)
        {
            WriteLine("template<>");
            WriteLine("class __GacUIInternal<{0}>", udt.ToString());
            WriteLine("{");
            Begin("public:");
            WriteLine("typedef {0} WrappedObjectType;", udt.ToString());
            WriteLine("typedef {0} InternalObjectType;", udt.AssociatedGacType.Name);
            WriteLine("");

            WriteLine("static InternalObjectType* GetInternalObject(const WrappedObjectType& wrappedObject)");
            Begin("{");
            WriteLine("return (InternalObjectType*)wrappedObject.__internal_object_reference;");
            End("}");
            WriteLine("");

            WriteLine("static InternalObjectType* GetInternalObject(const rptr<WrappedObjectType>& wrappedObject)");
            Begin("{");
            WriteLine("return (InternalObjectType*)wrappedObject->__internal_object_reference;");
            End("}");
            WriteLine("");

            WriteLine("static Ptr<InternalObjectType> GetInternalObject(const sptr<WrappedObjectType>& wrappedObject)");
            Begin("{");
            WriteLine("return _SptrBuilder<WrappedObjectType>::RetrivePtr<InternalObjectType>(wrappedObject);");
            End("}");
            WriteLine("");

            if (udt.Kind == RgacUDTKind.Struct)
            {
                WriteLine("static WrappedObjectType BuildCopy(const InternalObjectType* input)");
                Begin("{");
                WriteLine("return new InternalObjectType(*input);");
                End("}");
                WriteLine("");
            }

            WriteLine("static rptr<WrappedObjectType> BuildRptr(const InternalObjectType* input)");
            Begin("{");
            WriteLine("return _RptrBuilder<WrappedObjectType>::CreateRptr(input);");
            End("}");
            WriteLine("");

            WriteLine("static sptr<WrappedObjectType> BuildSptr(const vl::Ptr<InternalObjectType>& input)");
            Begin("{");
            WriteLine("return _SptrBuilder<WrappedObjectType>::CreateSptr(input);");
            End("}");
            WriteLine("");

            End("};");
            WriteLine("");
        }
 protected void GenerateConstructorInitializationList(RgacUDT udt, string internalObjectReferenceInput)
 {
     WriteLine("    :__internal_object_reference({0})", internalObjectReferenceInput);
     foreach (var baseUdt in udt.BaseClasses
              .Where(t => t.Access == GacAccess.Public && this.options.Udts.Contains(t.UDT))
              .Select(t => t.UDT)
              )
     {
         WriteLine("    ,{0}(static_cast<__GacUIInternal<{1}>::InternalObjectType*>((__GacUIInternal<{2}>::InternalObjectType*){3}))",
                   baseUdt.ToString(),
                   baseUdt.ToString(),
                   udt.ToString(),
                   internalObjectReferenceInput
                   );
     }
 }