VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
TextAnalysis
vtkTokenizer.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkTokenizer.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
20
81
#ifndef __vtkTokenizer_h
82
#define __vtkTokenizer_h
83
84
#include <
vtkTableAlgorithm.h
>
85
#include <
vtkUnicodeString.h
>
//Needed for delimiter specification
86
87
class
VTK_TEXT_ANALYSIS_EXPORT
vtkTokenizer
:
88
public
vtkTableAlgorithm
89
{
90
public
:
91
static
vtkTokenizer
*
New
();
92
vtkTypeMacro(
vtkTokenizer
,
vtkTableAlgorithm
);
93
void
PrintSelf
(ostream& os,
vtkIndent
indent);
94
95
//BTX
98
typedef
std::pair<vtkUnicodeString::value_type, vtkUnicodeString::value_type>
DelimiterRange
;
101
typedef
std::vector<DelimiterRange>
DelimiterRanges
;
102
105
static
const
DelimiterRanges
Punctuation();
108
static
const
DelimiterRanges
Whitespace();
112
static
const
DelimiterRanges
Logosyllabic();
113
116
void
AddDroppedDelimiters(
vtkUnicodeString::value_type
begin,
vtkUnicodeString::value_type
end);
119
void
AddDroppedDelimiters(
const
DelimiterRanges
& ranges);
120
123
void
AddKeptDelimiters(
vtkUnicodeString::value_type
begin,
vtkUnicodeString::value_type
end);
125
127
void
AddKeptDelimiters(
const
DelimiterRanges
& ranges);
128
//ETX
130
132
136
void
DropPunctuation();
137
void
DropWhitespace();
138
void
KeepPunctuation();
139
void
KeepWhitespace();
140
void
KeepLogosyllabic();
142
144
void
ClearDroppedDelimiters();
146
void
ClearKeptDelimiters();
147
148
//BTX
149
protected
:
150
vtkTokenizer
();
151
~
vtkTokenizer
();
152
153
int
FillInputPortInformation
(
int
port
,
vtkInformation
*
info
);
154
155
virtual
int
RequestData
(
156
vtkInformation
* request,
157
vtkInformationVector
** inputVector,
158
vtkInformationVector
* outputVector);
159
160
private
:
161
vtkTokenizer
(
const
vtkTokenizer
&);
// Not implemented.
162
void
operator=(
const
vtkTokenizer
&);
// Not implemented.
163
164
class
Internals;
165
Internals*
const
Implementation;
166
//ETX
167
};
168
169
#endif // __vtkTokenizer_h
170
Generated on Tue Jan 8 2013 05:45:39 for VTK by
1.8.1.2