summaryrefslogtreecommitdiff
path: root/libvtv/testsuite/parts-test-main.cc
blob: c90901e79197bfa49699bbb97f8894d26549f99e (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
31
32
33
34
35
36
37
#include "parts-test-main.h"
#include "parts-test-extra-parts-views.h"

MainParts::MainParts () {}

MainParts::~MainParts ()
{
  for (int i = static_cast<int>(main_extra_parts_.size()) - 1; i >= 0; --i)
    delete main_extra_parts_[i];
  main_extra_parts_.clear();
}

void
MainParts::AddParts (ExtraParts *parts)
{
  main_extra_parts_.push_back (parts);
}


void
MainParts::PreEarlyInitialization (void) 
{
  for (int i = 0; i < main_extra_parts_.size(); ++i)
    main_extra_parts_[i]->PreEarlyInitialization ();
}


int
main (int argc, char **argv)
{
  MainParts *main_parts = new MainParts ();

  main_parts->AddParts (new ExtraPartsViews ());
  main_parts->PreEarlyInitialization ();

  return 0;
}