main.cpp
2.08 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//*****************************************************************
/*
VLibras: Automatic pasteboardContents translator from Portuguese to LIBRAS
Copyright (c) 2015 Gustavo Sobral, Erickson Silva, Leonardo Araújo
VLibras-Core group at LAViD, Federal University of Paraiba
*/
//*****************************************************************
/**
* \file main.cpp
* \author Gustavo Sobral, Leonardo Araújo
* \date Janeiro 2015
*/
#include <core_plugin.h>
#include <iostream>
#include <fstream>
#include <string>
int main()
{
if (coreInitialize() != 1)
{
printf("Cannot initialize the CorePlugin.\n");
exit(-1);
}
int result_check = coreUpdateCheck();
switch (result_check)
{
case 0:
printf("The VLibras is up-to-date!\n");
break;
case 1:
printf("The VLibras is outdated! Upgrading...\n");
break;
case 2:
printf("Only the dictionary is outdated! Upgrading...\n");
break;
case -1:
printf("Error!\n");
break;
default:
printf("Option not found! Try again.\n");
}
// Inicializa o tradutor
//PyTradutor *tradutorTest;
//tradutorTest = new PyTradutor();
// Pega o conteúdo do clipboard e salva em `pasteboardContent`
//std::string pasteboardContent = Pasteboard::getGeneralContent();
// Traduz o conteúdo do clipboard em `pasteboardContent` para a string `traducao`
//char* str = new char[10];
//strcpy(str, "o gato comeu o rato");
//std::string traducao = tradutorTest->convertStringToGlosa(str);
// [LOG] Exibe o conteudo do buffer de clipboard em `pasteboardContent` e traduz para glosa salvando seu resultado em `traducao`
//std::cout << "[[ Conteudo em memoria ]]\n" << str << std::endl;
//std::cout << "[[ Tradução ]]\n" << traducao << std::endl;
//std::cout << "\n##### ##### #####" << std::endl;
// Inicializa o plugin
//std::cout << "[[Initialize]] | " << coreInitialize() << std::endl;
// Executa o CorePlugin
//std::cout << "[[Execute]] | " << coreExecute() << std::endl;
// Finaliza o ambiente
//std::cout << "[[Finalize]] | " << coreFinalize() << std::endl;
// Exclui o que foi utilizado
// delete tradutorTest;
return 0;
}