Exemplo n.º 1
0
        public ProjectClass AddClass(string className, Interface itf)
        {
            ProjectFile  header = new ProjectFile(Path.Combine(m_directory, className + ".h"));
            ProjectFile  impl   = new ProjectFile(Path.Combine(m_directory, className + ".cpp"));
            ProjectClass cls    = new ProjectClass(className, header, impl, itf);

            m_classes.Add(cls);
            return(cls);
        }
Exemplo n.º 2
0
        private void Initialize()
        {
            m_className = vcProject.safeClassName(m_portType.Name.localname);
            m_interface = new Interface("I" + m_className, "ISoapProxyBase");
            ProjectClass cls = m_project.AddClass(m_className, m_interface);

            m_proxyFileHeader = cls.header.Create();
            m_proxyFileCpp    = cls.impl.Create();
            StartHeader();
            StartCpp();
        }
Exemplo n.º 3
0
        public SerializerWriter(vcProject project, wsdlParser.qname serializerQName, string serializerName, string serializeeName)
        {
            ProjectClass cls = project.AddClass(serializerName, new Interface("ISoapSerializer", "IUnknown"));

            m_hdr            = cls.header.Create();
            m_impl           = cls.impl.Create();
            m_cppName        = serializerName;
            m_serializeeName = serializeeName;
            InitFiles();
            m_deserA = new ArrayList();
            m_deserE = new ArrayList();
            m_deserC = new ArrayList();
        }
Exemplo n.º 4
0
        public ComplexTypeWriter(vcProject project, string xmlName, string cppName)
        {
            m_itf = new Interface("I" + cppName, "IDispatch");
            ProjectClass cls = project.AddClass(cppName, m_itf);

            m_cppName        = cppName;
            m_impl           = cls.impl.Create();
            m_hdr            = cls.header.Create();
            m_vars           = new StringCollection();
            m_finalconstruct = new StringCollection();
            m_idl            = project.IdlFile;
            InitFiles(xmlName);
        }
Exemplo n.º 5
0
        public static string GenerateRgs(string projectName, string tlbId, string baseDirectory, ProjectClass cls)
        {
            Templater t = new Templater("rgs.txt");

            t.Add("<<PROJECT>>", projectName);
            t.Add("<<CLASS>>", cls.className);
            t.Add("<<CLSID>>", cls.clsid.ToString().ToUpper());
            t.Add("<<TLBID>>", tlbId.ToUpper());

            string fn = cls.className + ".rgs";

            using (StreamWriter sw = new StreamWriter(Path.Combine(baseDirectory, fn), false))
            {
                t.CopyToStream(sw);
            }
            return(fn);
        }