/[svn]/linuxsampler/trunk/src/engines/sfz/sfz.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sfz/sfz.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2529 by schoenebeck, Tue Mar 4 20:41:47 2014 UTC revision 2856 by persson, Wed Jan 6 10:02:40 2016 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com>          *   *   Copyright (C) 2008 Anders Dahnielson <anders@dahnielson.com>          *
6   *   Copyright (C) 2009 - 2013 Anders Dahnielson and Grigor Iliev          *   *   Copyright (C) 2009 - 2016 Anders Dahnielson and Grigor Iliev          *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 27  Line 27 
27  #include <fstream>  #include <fstream>
28  #include <iostream>  #include <iostream>
29  #include <vector>  #include <vector>
30    #include <stack>
31  #include <string>  #include <string>
32  #include <stdexcept>  #include <stdexcept>
33    
# Line 727  namespace sfz Line 728  namespace sfz
728      };      };
729    
730      /////////////////////////////////////////////////////////////      /////////////////////////////////////////////////////////////
731      // class Group      // class ContainerDefinition
732        
733      /// A Group act just as a template containing Region default values      ///A ContainerDefinition is any section of the SFZ files that contains other Definitions (global, master, and group).
734      class Group :      class ContainerDefinition :
735          public Definition          public Definition
736      {      {
737      public:      public:
738          Group();          enum section_type {GROUP = 0, MASTER, GLOBAL};
739          virtual ~Group();          
740            ContainerDefinition(section_type type);
741          /// Reset Group to default values          virtual ~ContainerDefinition();
742            
743            /// Reset all properties to default values
744          void Reset();          void Reset();
745            
746          /// Create a new Region          /// Copy all properties of this object to another Definition
747          Region* RegionFactory();          void CopyValuesToDefinition(Definition* definition);
748            
749          // id counter          section_type level;
         int id;  
   
750      };      };
751    
752      /////////////////////////////////////////////////////////////      /////////////////////////////////////////////////////////////
# Line 784  namespace sfz Line 785  namespace sfz
785          Instrument* _instrument;          Instrument* _instrument;
786    
787          // state variables          // state variables
788          enum section_t { UNKNOWN, GROUP, REGION, CONTROL, CURVE };          enum section_t { UNKNOWN, REGION, GROUP, MASTER, GLOBAL, CONTROL, CURVE };
789          section_t _current_section;          section_t _current_section;
790          Region* _current_region;          Region* _current_region;
791          Group* _current_group;          std::stack<ContainerDefinition*> _current_containers;
792            
793            static const std::string MACRO_NAME_CHARS;
794            static const std::string MACRO_VALUE_CHARS;
795            std::map<std::string, std::string> _defined_macros;
796            
797          Curve* _current_curve;          Curve* _current_curve;
798          Definition* pCurDef;          Definition* pCurDef;
799            int id;
800    
801          // control header directives          // control header directives
802          std::string default_path;          std::string default_path;

Legend:
Removed from v.2529  
changed lines
  Added in v.2856

  ViewVC Help
Powered by ViewVC