]> git.donarmstrong.com Git - lilypond.git/blob - lib/source.cc
release: 0.0.39-1
[lilypond.git] / lib / source.cc
1 //
2 // source.cc
3 //
4
5 #include <assert.h>
6
7 #include "string.hh"
8 #include "proto.hh"
9 #include "plist.hh"
10
11 #include "source-file.hh"
12 #include "source.hh"
13
14 Source::Source()
15 {
16 }
17
18 Source::~Source()
19 {
20 }
21
22 void
23 Source::add( Source_file* sourcefile_p )
24 {
25     sourcefile_p_iplist_.bottom().add( sourcefile_p );
26 }
27
28 Source_file*
29 Source::sourcefile_l( char const* ch_c_l )
30 {
31     PCursor<Source_file*> sourcefile_l_pcur( sourcefile_p_iplist_.top() );
32     for ( ; sourcefile_l_pcur.ok(); sourcefile_l_pcur++ )
33         if ( sourcefile_l_pcur->in_b( ch_c_l ) )        
34             return *sourcefile_l_pcur;
35     return 0;
36 }