home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / graphtal / devcdrvr.c < prev    next >
C/C++ Source or Header  |  1992-10-23  |  2KB  |  68 lines

  1. /*
  2.  * DeviceDriver.C - abstract base class for device drivers.
  3.  *
  4.  * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  */
  17.  
  18. #include "DeviceDriver.h"
  19.  
  20. //___________________________________________________________ DeviceDriver
  21.  
  22. implementTable(StringTable, rcString, anyPtr);
  23.  
  24. DeviceDriver::DeviceDriver()
  25. : primitives(0), LSystemName("Noname"),
  26.   definingMacro(0), macroNames(103), libraryNames(103),
  27.   theOptions(NULL)
  28. {}
  29.  
  30. DeviceDriver::DeviceDriver(Options* options)
  31. : primitives(0), LSystemName("Noname"),
  32.   definingMacro(0), macroNames(103), libraryNames(103),
  33.   theOptions(options)
  34. {}
  35.  
  36. DeviceDriver::~DeviceDriver(){}
  37.  
  38. void DeviceDriver::color(const Color&) {}
  39. void DeviceDriver::texture(const rcString&) {}
  40. void DeviceDriver::beginMacro(const rcString&)
  41. {
  42.   definingMacro = 1;
  43. }
  44. void DeviceDriver::endMacro()
  45. {
  46.   definingMacro = 0;
  47. }
  48. void DeviceDriver::executeMacro(const rcString&, const TransMatrix&){}
  49. void DeviceDriver::libraryObject(const rcString&, const TransMatrix&){}
  50.  
  51. int DeviceDriver::addMacroName(const rcString& macroName)
  52. {
  53.   return macroNames.insert(macroName, NULL);
  54. }
  55.  
  56. void DeviceDriver::addLibraryObjectName(const rcString& libName)
  57. {
  58.   libraryNames.insert(libName, NULL);
  59. }
  60.  
  61. void DeviceDriver::setName(const rcString& name)
  62. {
  63.   LSystemName = name;
  64. }
  65.  
  66.  
  67.  
  68.