]> www.fi.muni.cz Git - evince.git/blob - dvi/dvilib/dl-dvi-program.cc
Updated Swedish translation.
[evince.git] / dvi / dvilib / dl-dvi-program.cc
1 #include "dl-dvi-program.hh"
2 #include <algorithm>
3
4 using namespace DviLib;
5
6 typedef vector<DviCommand *>::iterator It;
7
8 void
9 DviProgram::execute (DviRuntime& runtime)
10 {
11     for (It i = commands.begin(); i != commands.end(); ++i)     
12     {
13         (*i)->execute (runtime);
14     }
15 }
16
17 void 
18 DviProgram::add_command (DviCommand *cmd)
19 {
20     cmd->ref();
21     commands.push_back (cmd);
22 }
23
24 DviProgram::~DviProgram (void)
25 {
26     for (It i = commands.begin(); i != commands.end(); ++i)
27     {
28         (*i)->unref ();
29     }
30 }