Public Member Functions | List of all members
BtrieveIndexAttributes Class Reference

The Btrieve index attributes class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveIndexAttributes ()
 
 ~BtrieveIndexAttributes ()
 
Btrieve::StatusCode AddKeySegment (BtrieveKeySegment *btrieveKeySegment)
 Add a key segment. More...
 
Btrieve::StatusCode SetACSMode (Btrieve::ACSMode ACSMode)
 Set the alternate collation sequence mode. More...
 
Btrieve::StatusCode SetACSName (const char *ACSName)
 Set the alternate collation sequence name. More...
 
Btrieve::StatusCode SetACSNumber (int ACSNumber)
 Set the alternate collation sequence number. More...
 
Btrieve::StatusCode SetACSUserDefined (const char *ACSName, const char *ACSMap, int ACSMapLength)
 Set the user defined alternate collation sequence. More...
 
Btrieve::StatusCode SetDuplicateMode (Btrieve::DuplicateMode duplicateMode)
 Set the duplicate mode. More...
 
Btrieve::StatusCode SetIndex (Btrieve::Index index)
 Set the index. More...
 
Btrieve::StatusCode SetModifiable (bool enableModifiable)
 Set modifiable. More...
 

Detailed Description

The Btrieve index attributes class.

Examples:
bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, and btestvlr.cpp.

Constructor & Destructor Documentation

◆ BtrieveIndexAttributes()

BtrieveIndexAttributes::BtrieveIndexAttributes ( )
Snippet
BtrieveIndexAttributes btrieveIndexAttributes;

◆ ~BtrieveIndexAttributes()

BtrieveIndexAttributes::~BtrieveIndexAttributes ( )

Member Function Documentation

◆ AddKeySegment()

Btrieve::StatusCode BtrieveIndexAttributes::AddKeySegment ( BtrieveKeySegment btrieveKeySegment)

Add a key segment.

Parameters
[in]btrieveKeySegmentThe key segment.
Description
Index attributes have no key segments initially.
Snippet
// If AddKeySegment() fails.
if ((status = btrieveIndexAttributes.AddKeySegment(&btrieveKeySegment)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveIndexAttributes::AddKeySegment():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, and btestvlr.cpp.

◆ SetACSMode()

Btrieve::StatusCode BtrieveIndexAttributes::SetACSMode ( Btrieve::ACSMode  ACSMode)

Set the alternate collation sequence mode.

Parameters
[in]ACSModeThe alternate collation sequence mode.
Description
Alternate collation sequence mode defaults to Btrieve::ACS_MODE_NONE. To set the alternate collation sequence mode to Btrieve::ACS_MODE_NAMED use BtrieveIndexAttributes::SetACSName or BtrieveIndexAttributes::SetACSUserDefined. To set the alternate collation sequence mode to Btrieve::ACS_MODE_NUMBERED use BtrieveIndexAttributes::SetACSNumber.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ SetACSName()

Btrieve::StatusCode BtrieveIndexAttributes::SetACSName ( const char *  ACSName)

Set the alternate collation sequence name.

Note
This method accepts international sort rule and unicode alternate collation sequence names only. Use BtrieveIndexAttributes::SetACSUserDefined to specify a user defined alternate collation sequence.
Parameters
[in]ACSNameThe alternate collation sequence name.
Description
By default there is no alternate collation sequence name. Setting the alternate collation sequence name also sets the alternate collation sequence mode to Btrieve::ACS_MODE_NAMED.
Snippet
// If SetACSName() fails.
if ((status = btrieveIndexAttributes.SetACSName("u54-msft_enus_0")) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveIndexAttributes::SetACSName():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfilter.cpp, and bindexattributes.cpp.

◆ SetACSNumber()

Btrieve::StatusCode BtrieveIndexAttributes::SetACSNumber ( int  ACSNumber)

Set the alternate collation sequence number.

Parameters
[in]ACSNumberThe alternate collation sequence number.
Description
By default there is no alternate collation sequence number. Setting the alternate collation sequence number also sets the alternate collation sequence mode to Btrieve::ACS_MODE_NUMBERED.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ SetACSUserDefined()

Btrieve::StatusCode BtrieveIndexAttributes::SetACSUserDefined ( const char *  ACSName,
const char *  ACSMap,
int  ACSMapLength 
)

Set the user defined alternate collation sequence.

Parameters
[in]ACSNameThe alternate collation sequence name.
[in]ACSMapThe alternate collation sequence map.
[in]ACSMapLengthThe alternate collation sequence map length.
Description
By default there is no user defined alternate collation sequence. Setting the user defined alternate collation sequence also sets the alternate collation sequence mode to Btrieve::ACS_MODE_NAMED.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ SetDuplicateMode()

Btrieve::StatusCode BtrieveIndexAttributes::SetDuplicateMode ( Btrieve::DuplicateMode  duplicateMode)

Set the duplicate mode.

Parameters
[in]duplicateModeThe duplicate mode.
Description
Duplicate mode defaults to Btrieve::DUPLICATE_MODE_NOT_ALLOWED.
Snippet
// If SetDuplicateMode() fails.
{
printf("Error: BtrieveIndexAttributes::SetDuplicateMode():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bindexattributes.cpp.

◆ SetIndex()

Btrieve::StatusCode BtrieveIndexAttributes::SetIndex ( Btrieve::Index  index)

Set the index.

Parameters
[in]indexThe index.
Description
Index defaults to the first available index starting at Btrieve::INDEX_1.
Snippet
// If SetIndex() fails.
if ((status = btrieveIndexAttributes.SetIndex(Btrieve::INDEX_119)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveIndexAttributes::SetIndex():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bindexattributes.cpp.

◆ SetModifiable()

Btrieve::StatusCode BtrieveIndexAttributes::SetModifiable ( bool  enableModifiable)

Set modifiable.

Parameters
[in]enableModifiableEnable modifiable?
Description
Modifiable is enabled by default.
Snippet
// If SetModifiable() fails.
if ((status = btrieveIndexAttributes.SetModifiable(false)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveIndexAttributes::SetModifiable():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bindexattributes.cpp.