Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/dvi/dvilib/dl-dvi-program.cc
blob: cb1f07fcbe275f2576d56d241de31dae7715ef73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "dl-dvi-program.hh"
#include <algorithm>

using namespace DviLib;

typedef vector<DviCommand *>::iterator It;

void
DviProgram::execute (DviRuntime& runtime)
{
    for (It i = commands.begin(); i != commands.end(); ++i)	
    {
	(*i)->execute (runtime);
    }
}

void 
DviProgram::add_command (DviCommand *cmd)
{
    cmd->ref();
    commands.push_back (cmd);
}

DviProgram::~DviProgram (void)
{
    for (It i = commands.begin(); i != commands.end(); ++i)
    {
	(*i)->unref ();
    }
}