公開メンバ関数 | 全メンバ一覧
BtrieveFileAttributes クラス

Btrieve ファイル属性クラス。 [詳解]

#include <btrieveCpp.h>

公開メンバ関数

 BtrieveFileAttributes ()
 
 ~BtrieveFileAttributes ()
 
Btrieve::StatusCode SetBalancedIndexes (bool enableBalancedIndexes)
 インデックス バランスを設定します。 [詳解]
 
Btrieve::StatusCode SetFileVersion (Btrieve::FileVersion fileVersion)
 ファイル バージョンを設定します。 [詳解]
 
Btrieve::StatusCode SetFixedRecordLength (int fixedRecordLength)
 固定レコード長を設定します。 [詳解]
 
Btrieve::StatusCode SetFreeSpaceThreshold (Btrieve::FreeSpaceThreshold freeSpaceThreshold)
 空きスペース スレッショルドを設定します。 [詳解]
 
Btrieve::StatusCode SetKeyOnly (bool enableKeyOnly)
 キー オンリーを設定します。 [詳解]
 
Btrieve::StatusCode SetPageSize (Btrieve::PageSize pageSize, bool enablePageCompression=false)
 ページ サイズを設定します。 [詳解]
 
Btrieve::StatusCode SetPreallocatedPageCount (int preallocatedPageCount)
 プリアロケート ページ数を設定します。 [詳解]
 
Btrieve::StatusCode SetRecordCompressionMode (Btrieve::RecordCompressionMode recordCompressionMode)
 レコード圧縮モードを設定します。 [詳解]
 
Btrieve::StatusCode SetReservedDuplicatePointerCount (int reservedDuplicatePointerCount)
 予約重複ポインター数を設定します。 [詳解]
 
Btrieve::StatusCode SetSystemDataMode (Btrieve::SystemDataMode systemDataMode)
 システム データ モードを設定します。 [詳解]
 
Btrieve::StatusCode SetVariableLengthRecordsMode (Btrieve::VariableLengthRecordsMode variableLengthRecordsMode)
 可変長レコード モードを設定します。 [詳解]
 

詳解

Btrieve ファイル属性クラス。

各種例:
bfileattributes.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, btestvlr.cpp, Test_BTRV2.cpp.

構築子と解体子

◆ BtrieveFileAttributes()

BtrieveFileAttributes::BtrieveFileAttributes ( )
スニペット
BtrieveFileAttributes btrieveFileAttributes;

◆ ~BtrieveFileAttributes()

BtrieveFileAttributes::~BtrieveFileAttributes ( )

関数詳解

◆ SetBalancedIndexes()

Btrieve::StatusCode BtrieveFileAttributes::SetBalancedIndexes ( bool  enableBalancedIndexes)

インデックス バランスを設定します。

引数
[in]enableBalancedIndexesインデックス バランスを有効にする。
説明
デフォルトでは、インデックス バランスは無効になっています。
スニペット
// If SetBalancedIndexes() fails.
if ((status = btrieveFileAttributes.SetBalancedIndexes(true)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveFileAttributes::SetBalancedIndexes():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetFileVersion()

Btrieve::StatusCode BtrieveFileAttributes::SetFileVersion ( Btrieve::FileVersion  fileVersion)

ファイル バージョンを設定します。

引数
[in]fileVersionファイル バージョン。
説明
ファイル バージョンのデフォルト値は Btrieve::FILE_VERSION_DEFAULT です。 ファイル バージョン Btrieve::FILE_VERSION_6_0Btrieve::FILE_VERSION_6_1 にマップされます。
スニペット
// If SetFileVersion() fails.
{
printf("Error: BtrieveFileAttributes::SetFileVersion():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetFixedRecordLength()

Btrieve::StatusCode BtrieveFileAttributes::SetFixedRecordLength ( int  fixedRecordLength)

固定レコード長を設定します。

引数
[in]fixedRecordLength固定レコード長。固定レコード長は、1 ~ Btrieve::MAXIMUM_RECORD_LENGTH の範囲内で指定する必要があります。
説明
固定レコード長のデフォルト値は 0 です。
スニペット
// If SetFixedRecordLength() fails.
if ((status = btrieveFileAttributes.SetFixedRecordLength(sizeof(record_t))) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveFileAttributes::SetFixedRecordLength():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, btestvlr.cpp, Test_BTRV2.cpp.

◆ SetFreeSpaceThreshold()

Btrieve::StatusCode BtrieveFileAttributes::SetFreeSpaceThreshold ( Btrieve::FreeSpaceThreshold  freeSpaceThreshold)

空きスペース スレッショルドを設定します。

引数
[in]freeSpaceThreshold空きスペース スレッショルド。
説明
空きスペース スレッショルドのデフォルト値は Btrieve::FREE_SPACE_THRESHOLD_DEFAULT です。 可変長レコードが有効でなければ、空きスペース スレッショルドの設定は無視されます。
スニペット
// If SetFreeSpaceThreshold() fails.
{
printf("Error: BtrieveFileAttributes::SetFreeSpaceThreshold():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetKeyOnly()

Btrieve::StatusCode BtrieveFileAttributes::SetKeyOnly ( bool  enableKeyOnly)

キー オンリーを設定します。

引数
[in]enableKeyOnlyキー オンリーを有効にする。
説明
デフォルトでは、キー オンリーは無効になっています。 キー オンリーを有効にすると、システム データ モードは無視されます。
スニペット
// If SetKeyOnly() fails.
if ((status = btrieveFileAttributes.SetKeyOnly(true)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveFileAttributes::SetKeyOnly():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bkeyonly.cpp.

◆ SetPageSize()

Btrieve::StatusCode BtrieveFileAttributes::SetPageSize ( Btrieve::PageSize  pageSize,
bool  enablePageCompression = false 
)

ページ サイズを設定します。

引数
[in]pageSizeページ サイズ。
[in]enablePageCompressionページ圧縮を有効にする。
説明
ページ サイズのデフォルト値は Btrieve::PAGE_SIZE_4096 です。 ページ圧縮は、デフォルトでは無効になっており、ファイル バージョン Btrieve::FILE_VERSION_9_5 以降を必要とします。 すべてのページ サイズがすべてのファイル バージョンで有効であるとは限りません。 4096 より大きいページ サイズは、ファイル バージョン Btrieve::FILE_VERSION_9_0 以降を必要とします。 特定のファイル バージョンでサポートされないページ サイズは、サポートされる次のサイズへ切り上げられます。
スニペット
// If SetPageSize() fails.
if ((status = btrieveFileAttributes.SetPageSize(Btrieve::PAGE_SIZE_16384, true)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveFileAttributes::SetPageSize():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetPreallocatedPageCount()

Btrieve::StatusCode BtrieveFileAttributes::SetPreallocatedPageCount ( int  preallocatedPageCount)

プリアロケート ページ数を設定します。

引数
[in]preallocatedPageCountプリアロケート ページ数。プリアロケート ページ数は、0 ~ 65535 の範囲内で指定する必要があります。
説明
プリアロケート ページ数のデフォルト値は 0 です。
スニペット
// If SetPreallocatedPageCount() fails.
if ((status = btrieveFileAttributes.SetPreallocatedPageCount(64 * 1024 - 1)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveFileAttributes::SetPreallocatedPageCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetRecordCompressionMode()

Btrieve::StatusCode BtrieveFileAttributes::SetRecordCompressionMode ( Btrieve::RecordCompressionMode  recordCompressionMode)

レコード圧縮モードを設定します。

引数
[in]recordCompressionModeレコード圧縮モード。
説明
レコード圧縮のデフォルト値は Btrieve::RECORD_COMPRESSION_MODE_NONE です。 圧縮モードのブランク トランケーションでは、可変長レコードが有効になっている必要があります。
スニペット
// If SetRecordCompressionMode() fails.
{
printf("Error: BtrieveFileAttributes::SetRecordCompressionMode():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetReservedDuplicatePointerCount()

Btrieve::StatusCode BtrieveFileAttributes::SetReservedDuplicatePointerCount ( int  reservedDuplicatePointerCount)

予約重複ポインター数を設定します。

引数
[in]reservedDuplicatePointerCount予約重複ポインター数。予約重複ポインター数は、0 ~ 119 の範囲内で指定する必要があります。
説明
予約重複ポインター数のデフォルト値は 0 です。 ファイル バージョンとページ サイズにより、予約重複ポインターの最大数は 119 より小さくなることがあります。 たとえば、ファイル バージョン Btrieve::FILE_VERSION_9_0 とページ サイズ Btrieve::PAGE_SIZE_3584 では、予約重複ポインターの最大数は 54 になります。
スニペット
// If SetReservedDuplicatePointerCount() fails.
if ((status = btrieveFileAttributes.SetReservedDuplicatePointerCount(119)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveFileAttributes::SetReservedDuplicatePointerCount():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetSystemDataMode()

Btrieve::StatusCode BtrieveFileAttributes::SetSystemDataMode ( Btrieve::SystemDataMode  systemDataMode)

システム データ モードを設定します。

引数
[in]systemDataModeシステム データ モード。
説明
システム データ モードのデフォルト値は Btrieve::SYSTEM_DATA_MODE_DEFAULT です。
スニペット
// If SetSystemDataMode() fails.
{
printf("Error: BtrieveFileAttributes::SetSystemDataMode():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp.

◆ SetVariableLengthRecordsMode()

Btrieve::StatusCode BtrieveFileAttributes::SetVariableLengthRecordsMode ( Btrieve::VariableLengthRecordsMode  variableLengthRecordsMode)

可変長レコード モードを設定します。

引数
[in]variableLengthRecordsMode可変長レコード モード。
説明
可変長レコード モードのデフォルト値は Btrieve::VARIABLE_LENGTH_RECORDS_MODE_NO です。
スニペット
// If SetVariableLengthRecordsMode() fails.
{
printf("Error: BtrieveFileAttributes::SetVariableLengthRecordsMode():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
戻り値
= Btrieve::STATUS_CODE_NO_ERROR成功。
!= Btrieve::STATUS_CODE_NO_ERRORエラーが発生しました。
参照
Btrieve::StatusCodeToString
各種例:
bfileattributes.cpp, btestappend.cpp, btestchunk.cpp, btestvlr.cpp.