File: Main.cpp

package info (click to toggle)
bouml 4.21-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 73,336 kB
  • ctags: 55,459
  • sloc: cpp: 290,644; makefile: 228; sh: 13
file content (35 lines) | stat: -rw-r--r-- 775 bytes parent folder | download
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
#include <qapplication.h>

#include "UmlCom.h"
#include "UmlItem.h"
#include "UmlComponent.h"
#include "UmlClass.h"

// the program is called with the socket port number in argument
// and a second argument which must be "ci" (check-in) or "co"

int main(int argc, char ** argv)
{
  if (argc != 3)
    return 0;
  
  QApplication a(argc, argv);

  if (UmlCom::connect(QString(argv[2]).toUInt())) {
    try {
      bool ci = (strcmp(argv[1], "ci") == 0);

      UmlCom::trace((ci) ? "<b>file control</b> release 1.0.5, check-in"
			 : "<b>file control</b> release 1.0.5, check-out");
      UmlCom::targetItem()->fileControl(ci);
    }
    catch (...) {
    }

    // must be called to cleanly inform that all is done
    UmlCom::bye();
  }
  
  UmlCom::close();
  return 0;
}