Advanced Strategic Command
music.h
Go to the documentation of this file.
1 #ifndef musicH
2 #define musicH
3 
8 #include <vector>
9 #include <map>
10 
11 #include "global.h"
12 #include "ascstring.h"
13 #include "textfile_evaluation.h"
14 #include "itemrepository.h"
15 
16 
20  ASCString name;
21  typedef vector<ASCString> TrackList;
22 
24  TrackList fileNameList;
25 
27  TrackList fileGroups;
28 
29  TrackList::iterator iter;
30  public:
31  const ASCString& getName ( ) { return name; };
32 
34 
36  void runTextIO ( PropertyContainer& pc );
37 
39  void reset();
40 
42  const ASCString& getNextTrack();
43 
44  void read ( tnstream& stream );
45  void write ( tnstream& stream ) const;
46 
48 };
49 
51  public:
52  virtual void readTextFiles(PropertyReadingContainer& prc, const ASCString& fileName, const ASCString& location);
53  virtual void read ( tnstream& stream );
54  virtual void write ( tnstream& stream );
55  virtual ASCString getTypeName() { return "playlist"; };
56 };
57 
59 extern void startMusic ();
60 
61 
62 
63 
65 extern void selectPlayList( );
66 
67 #endif
void runTextIO(PropertyContainer &pc)
loads a PlayList from a .ASCTXT file
Definition: music.cpp:47
ASCString getDiagnosticText()
Definition: music.cpp:117
void startMusic()
start playing the first playlist
Definition: music.cpp:143
A List containing several tracks of music.
Definition: music.h:19
Functions to evaluate the parsed *.asctxt files.
void read(tnstream &stream)
Definition: music.cpp:58
Global platform dependant definitions. This file just branches to the platform specific files in thei...
The interface for all kinds of IO stream.
void selectPlayList()
opens a dialog to select a playlist
Definition: music.cpp:215
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14
virtual ASCString getTypeName()
Definition: music.h:55
ASCString filename
Definition: music.h:31
const ASCString & getName()
Definition: music.h:31
void reset()
resets the internal track iterator
Definition: music.cpp:92
virtual void read(tnstream &stream)
Definition: music.cpp:36
const ASCString & getNextTrack()
returns the filename of the next music track
Definition: music.cpp:79
virtual void readTextFiles(PropertyReadingContainer &prc, const ASCString &fileName, const ASCString &location)
Definition: music.cpp:26
virtual void write(tnstream &stream)
Definition: music.cpp:41
void write(tnstream &stream) const
Definition: music.cpp:69
ASCString location
Definition: music.h:31