/[svn]/libgig/trunk/src/gigdump.cpp
ViewVC logotype

Diff of /libgig/trunk/src/gigdump.cpp

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

revision 916 by schoenebeck, Thu Aug 10 21:27:50 2006 UTC revision 929 by schoenebeck, Tue Oct 24 22:24:45 2006 UTC
# Line 36  using namespace std; Line 36  using namespace std;
36  string Revision();  string Revision();
37  void PrintVersion();  void PrintVersion();
38  void PrintFileInformations(gig::File* gig);  void PrintFileInformations(gig::File* gig);
39    void PrintGroups(gig::File* gig);
40  void PrintSamples(gig::File* gig);  void PrintSamples(gig::File* gig);
41  void PrintInstruments(gig::File* gig);  void PrintInstruments(gig::File* gig);
42  void PrintRegions(gig::Instrument* instr);  void PrintRegions(gig::Instrument* instr);
# Line 66  int main(int argc, char *argv[]) Line 67  int main(int argc, char *argv[])
67          gig::File*  gig  = new gig::File(riff);          gig::File*  gig  = new gig::File(riff);
68          PrintFileInformations(gig);          PrintFileInformations(gig);
69          cout << endl;          cout << endl;
70            PrintGroups(gig);
71            cout << endl;
72          PrintSamples(gig);          PrintSamples(gig);
73          cout << endl;          cout << endl;
74          PrintInstruments(gig);          PrintInstruments(gig);
# Line 129  void PrintFileInformations(gig::File* gi Line 132  void PrintFileInformations(gig::File* gi
132      }      }
133  }  }
134    
135    void PrintGroups(gig::File* gig) {
136        int groups = 0;
137        cout << "ALL defined Groups:" << endl;
138        for (gig::Group* pGroup = gig->GetFirstGroup(); pGroup; pGroup = gig->GetNextGroup()) {
139            groups++;
140            string name = pGroup->Name;
141            if (name == "") name = "<NO NAME>";
142            else            name = '\"' + name + '\"';
143            cout << "    Group " << groups << ")" << endl;
144            cout << "        Name: " << name << endl;
145        }
146    }
147    
148  void PrintSamples(gig::File* gig) {  void PrintSamples(gig::File* gig) {
149      int samples = 0;      int samples = 0;
150      cout << "ALL Available Samples (as there might be more than referenced by Instruments):" << endl;      cout << "ALL Available Samples (as there might be more than referenced by Instruments):" << endl;
# Line 369  void PrintDimensionRegions(gig::Region* Line 385  void PrintDimensionRegions(gig::Region*
385  }  }
386    
387  string Revision() {  string Revision() {
388      string s = "$Revision: 1.19 $";      string s = "$Revision: 1.20 $";
389      return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword      return s.substr(11, s.size() - 13); // cut dollar signs, spaces and CVS macro keyword
390  }  }
391    

Legend:
Removed from v.916  
changed lines
  Added in v.929

  ViewVC Help
Powered by ViewVC