예제 #1
0
        /// \brief ctor
        public CDotGraphImage(CPreviewImageCollection collection, COptions options, bool is_file, string file_path_or_sourceCode) : base(collection, options)
        {
            this.sourceIsFile_ = is_file;

            // generate new temporary source file name and path
            this.tempSourcePath_ = CManager.DoxExtTempPath;
            if (this.sourceIsFile_)
            {
                this.tempSourceFileName_ = "";
                this.tempSourceFilePath_ = file_path_or_sourceCode;
            }
            else
            {
                this.TempFilePath(tempSourcePath_, this.TempName, "dot", out this.tempSourceFileName_, out this.tempSourceFilePath_);
            }

            // generate new temporary preview file path and path
            this.previewCachePath_ = CManager.DoxExtTempPath;
            this.TempFilePath(this.previewCachePath_, this.TempName, this.previewFileExt_, out this.previewFileName_, out this.previewFilePath_);

            // generate temporary process batch file
            string dummyName;

            this.TempFilePath(this.previewCachePath_, this.TempName, "bat", out dummyName, out this.processFilePath_);

            // generate preview image from source code
            Convert(this.sourceIsFile_ ? "" : file_path_or_sourceCode);
        }
        /// \brief ctor
        public CPreviewImageBase(CPreviewImageCollection collection, COptions options)
        {
            this.Collection = collection;
            this.Options    = options;

            // generate new temporary file name
            this.TempName = collection.NewTempPreviewFileName();
        }
        /// \brief ctor
        public CPlantUMLImage(CPreviewImageCollection collection, COptions options, string sourceCode) : base(collection, options)
        {
            // generate new temporary source file name and path
            this.tempSourcePath_ = this.Options.UmlPaths.Count > 0 ? this.Options.UmlPaths[0] : this.Options.DoxRootPath;
            this.TempFilePath(tempSourcePath_, this.TempName, "plantuml", out this.tempSourceFileName_, out this.tempSourceFilePath_);

            // generate new temporary preview file path and path
            previewCachePath_ = CManager.DoxExtTempPath;
            this.TempFilePath(this.previewCachePath_, this.TempName, this.previewFileExt_, out this.previewFileName_, out this.previewFilePath_);

            // generate preview image from source code
            Convert(sourceCode);
        }
        /// \brief ctor
        public CLatexFormulaImage(CPreviewImageCollection collection, COptions options, bool is_file, string file_path_or_formula) : base(collection, options)
        {
            this.sourceIsFile_ = is_file;

            // generate new temporary source file name and path
            this.tempSourcePath_ = CManager.DoxExtTempPath;
            if (this.sourceIsFile_)
            {
                this.tempSourceFileName_ = "";
                this.tempSourceFilePath_ = file_path_or_formula;
            }
            else
            {
                this.TempFilePath(tempSourcePath_, this.TempName, "latexf", out this.tempSourceFileName_, out this.tempSourceFilePath_);
            }

            // generate new temporary preview file path and path
            this.previewCachePath_ = CManager.DoxExtTempPath;
            this.TempFilePath(this.previewCachePath_, this.TempName, this.previewFileExt_, out this.previewFileName_, out this.previewFilePath_);

            // generate preview image from source code
            Convert(this.sourceIsFile_ ? "" : file_path_or_formula);
        }