Antenna House PDF Tool API (C++) 8.0
PdfTk::PtlSearchTextResults クラス

#include <PtlSearchTextResults.h>

公開メンバ関数

int getHandle () const
 PtlSearchTextResults ()
 コンストラクタ
 PtlSearchTextResults (const PtlSearchTextResults &obj)
 コピーコンストラクタ alias copy
 ~PtlSearchTextResults ()
 デストラクタ
PtlSearchTextResultsoperator= (const PtlSearchTextResults &obj)
 コピーオペレータ alias copy
bool isEmpty () const
 空かどうかを取得。
int getCount () const
 テキスト検索結果数を取得。
PtlSearchTextResultget (int index)
 テキスト検索結果を取得。

詳解

PtlPDFDocument/PtlPageのsearchText関数で取得されるテキスト検索結果のコンテナを表現するクラスです。

ページ番号
検索に使用した文字
検索でヒットした文字
検索でヒットした文字を囲むQuadPoint
(例) "日本の夏""ヨーロッパの冬"で検索して3箇所ヒット
1ページ
"日本の夏"
"日本の夏"
1ページ
"日本の夏"
"日本の"
"夏"
1ページ
"ヨーロッパの冬"
"ヨーロッパの冬"
PtlSearchTextResults()
コンストラクタ

PtlSearchTextResults.h50 行目に定義があります。

構築子と解体子

◆ PtlSearchTextResults() [1/2]

PdfTk::PtlSearchTextResults::PtlSearchTextResults ( )

コンストラクタ

例外
PtlException

◆ PtlSearchTextResults() [2/2]

PdfTk::PtlSearchTextResults::PtlSearchTextResults ( const PtlSearchTextResults & obj)

コピーコンストラクタ alias copy

引数
objコピー元オブジェクト。
例外
PtlException

関数詳解

◆ get()

PtlSearchTextResult & PdfTk::PtlSearchTextResults::get ( int index)

テキスト検索結果を取得。

指定した番号の検索結果を取得します。

引数
indexIndex番号。0が先頭。
indexが負や検索結果数以上の場合は、例外が発生します。
戻り値
検索結果(PtlSearchTextResult)。
例外
PtlException

◆ getCount()

int PdfTk::PtlSearchTextResults::getCount ( ) const

テキスト検索結果数を取得。

戻り値
検索結果数。
例外
PtlException

◆ isEmpty()

bool PdfTk::PtlSearchTextResults::isEmpty ( ) const

空かどうかを取得。

戻り値
true: 空、false: 空ではない。
例外
PtlException

◆ operator=()

PtlSearchTextResults & PdfTk::PtlSearchTextResults::operator= ( const PtlSearchTextResults & obj)

コピーオペレータ alias copy

引数
objコピー元オブジェクト。