Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
sample
show-effect.cc
Go to the documentation of this file.
1
/* show-effect.cc
2
*/
3
#include "
osl/effect_util/effectUtil.h
"
4
#include "
osl/record/csaRecord.h
"
5
#include "
osl/record/csa.h
"
6
#include <iostream>
7
#include <cstdio>
8
using namespace
osl;
9
Square
target
(5,8);
10
11
int
main
(
int
argc,
char
**argv)
12
{
13
// const char *program_name = argv[0];
14
bool
error_flag =
false
;
15
bool
verbose
=
false
;
16
17
// extern char *optarg;
18
extern
int
optind;
19
char
c;
20
while
((c = getopt(argc, argv,
"vh"
)) != EOF)
21
{
22
switch
(c)
23
{
24
case
'v'
: verbose =
true
;
25
break
;
26
default
: error_flag =
true
;
27
}
28
}
29
argc -= optind;
30
argv += optind;
31
32
if
(error_flag)
33
return
1;
34
35
nice(20);
36
37
//次に CSAファイルを処理
38
for
(
int
i=0; i<argc; ++i)
39
{
40
CsaFile file(argv [i]);
41
NumEffectState state(file.getInitialState());
42
PieceVector v;
43
EffectUtil::findEffect(
BLACK
, state,
target
, v);
44
std::cout << v;
45
}
46
}
47
48
/* ------------------------------------------------------------------------- */
49
// ;;; Local Variables:
50
// ;;; mode:c++
51
// ;;; c-basic-offset:2
52
// ;;; End:
Generated on Sun Jul 21 2013 13:37:27 by
1.8.4