cmDSPWriter.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. /**
  12. * cmDSPMakefile generate a microsoft DSP project file.
  13. * see the *.dsptemplate files for information on the templates
  14. * used for making the project files.
  15. */
  16. #ifndef cmDSPMakefile_h
  17. #define cmDSPMakefile_h
  18. #ifdef _MSC_VER
  19. #pragma warning ( disable : 4786 )
  20. #endif
  21. #include "cmMakefile.h"
  22. #include <vector>
  23. class cmDSPMakefile : public cmMakefile
  24. {
  25. public:
  26. void OutputDSPFile();
  27. enum BuildType { STATIC_LIBRARY, DLL, EXECUTABLE };
  28. void SetBuildType(BuildType );
  29. // return array of created DSP names
  30. // Each executable must have its own dsp
  31. std::vector<std::string> GetCreatedProjectNames()
  32. {
  33. return m_CreatedProjectNames;
  34. }
  35. private:
  36. std::string m_DSPHeaderTemplate;
  37. std::string m_DSPFooterTemplate;
  38. std::vector<std::string> m_CreatedProjectNames;
  39. void CreateExecutableDSPFiles();
  40. void CreateSingleDSP();
  41. void WriteDSPFile(std::ostream& fout);
  42. void WriteDSPBeginGroup(std::ostream& fout,
  43. const char* group,
  44. const char* filter);
  45. void WriteDSPEndGroup(std::ostream& fout);
  46. void WriteDSPHeader(std::ostream& fout);
  47. void WriteDSPBuildRules(std::ostream& fout);
  48. void WriteDSPBuildRule(std::ostream& fout, const char*);
  49. void WriteDSPFooter(std::ostream& fout);
  50. void WriteDSPBuildRule(std::ostream& fout);
  51. void WriteCustomRule(std::ostream& fout,
  52. const char* source,
  53. const char* result,
  54. const char* command);
  55. private:
  56. std::string m_IncludeOptions;
  57. std::string m_DebugLibraryOptions;
  58. std::string m_ReleaseLibraryOptions;
  59. };
  60. #endif