Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CmdRender.C

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2019 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: CmdRender.C,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.39 $       $Date: 2019/01/17 21:20:58 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *  Render a scene (so far, there is only one, the global one) as some
00019  * sort of rendered output; postscipt, rayshade, POVray, raster3D, etc.
00020  *
00021  ***************************************************************************/
00022 
00023 #include <stdlib.h>
00024 
00025 #include "CmdRender.h"
00026 #include "utilities.h"
00027 
00028 
00030 CmdRender::CmdRender(const char *newfilename, const char *newmethod, 
00031                      const char *newcmd)
00032         : Command(Command::RENDER) {
00033   filename = stringdup(newfilename);
00034   method = stringdup(newmethod);
00035   extcmd = (newcmd ? stringdup(newcmd) : (char *) NULL);
00036 }
00037 
00038 CmdRender::~CmdRender(void) {
00039   delete [] filename;
00040   delete [] method;
00041   if(extcmd)  delete [] extcmd;
00042 }
00043 
00044 void CmdRender::create_text(void) {
00045   *cmdText << "render " << method << " " << filename;
00046   if(extcmd)
00047     *cmdText << " " << extcmd;
00048   *cmdText << ends;
00049 }
00050 
00052 CmdRenderOption::CmdRenderOption(const char *met, const char *opt)
00053 : Command(Command::RENDER_OPTION) {
00054   method = stringdup(met);
00055   option = stringdup(opt);
00056 }
00057 
00058 CmdRenderOption::~CmdRenderOption() {
00059   delete [] method;
00060   delete [] option;
00061 }
00062 

Generated on Wed Oct 9 02:42:02 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002