Public Member Functions | List of all members
BtrieveVersion Class Reference

The Btrieve version class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveVersion ()
 
 ~BtrieveVersion ()
 
int GetClientRevisionNumber ()
 Get the client revision number. More...
 
int GetClientVersionNumber ()
 Get the client version number. More...
 
Btrieve::VersionType GetClientVersionType ()
 Get the client version type. More...
 
Btrieve::StatusCode GetLastStatusCode ()
 Get the last status code. More...
 
int GetLocalRevisionNumber ()
 Get the local revision number. More...
 
int GetLocalVersionNumber ()
 Get the local version number. More...
 
Btrieve::VersionType GetLocalVersionType ()
 Get the local version type. More...
 
int GetRemoteRevisionNumber ()
 Get the remote revision number. More...
 
int GetRemoteVersionNumber ()
 Get the remote version number. More...
 
Btrieve::VersionType GetRemoteVersionType ()
 Get the remote version type. More...
 

Detailed Description

The Btrieve version class.

Examples:
bversion.cpp.

Constructor & Destructor Documentation

◆ BtrieveVersion()

BtrieveVersion::BtrieveVersion ( )
Snippet
BtrieveVersion btrieveVersion;
See also
BtrieveClient::GetVersion

◆ ~BtrieveVersion()

BtrieveVersion::~BtrieveVersion ( )

Member Function Documentation

◆ GetClientRevisionNumber()

int BtrieveVersion::GetClientRevisionNumber ( )

Get the client revision number.

Description
Client refers to the instance of PSQL used by the caller.
Snippet
// If GetClientRevisionNumber() fails.
if ((i = btrieveVersion.GetClientRevisionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetClientRevisionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("ClientRevisionNumber = %d\n", i);
Return values
>= 0The revision number.
-1An error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples:
bversion.cpp.

◆ GetClientVersionNumber()

int BtrieveVersion::GetClientVersionNumber ( )

Get the client version number.

Description
Client refers to the instance of PSQL used by the caller.
Snippet
// If GetClientVersionNumber() fails.
if ((i = btrieveVersion.GetClientVersionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetClientVersionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("ClientVersionNumber = %d\n", i);
Return values
>= 0The version number.
-1An error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples:
bversion.cpp.

◆ GetClientVersionType()

Btrieve::VersionType BtrieveVersion::GetClientVersionType ( )

Get the client version type.

Description
Client refers to the instance of PSQL used by the caller.
Snippet
// If GetClientVersionType() fails.
if ((btrieveVersionType = btrieveVersion.GetClientVersionType()) == Btrieve::VERSION_TYPE_UNKNOWN)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetClientVersionType():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("ClientVersionType = %s\n", Btrieve::VersionTypeToString(btrieveVersionType));
Return values
!= Btrieve::VERSION_TYPE_UNKNOWNThe client version type.
= Btrieve::VERSION_TYPE_UNKNOWNAn error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
See also
Btrieve::VersionTypeToString
Examples:
bversion.cpp.

◆ GetLastStatusCode()

Btrieve::StatusCode BtrieveVersion::GetLastStatusCode ( )

Get the last status code.

Snippet
// If GetClientRevisionNumber() fails.
if ((i = btrieveVersion.GetClientRevisionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetClientRevisionNumber():%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:
bversion.cpp.

◆ GetLocalRevisionNumber()

int BtrieveVersion::GetLocalRevisionNumber ( )

Get the local revision number.

Description
Local refers to the instance of PSQL running locally with the caller.
Snippet
// If GetLocalRevisionNumber() fails.
if ((i = btrieveVersion.GetLocalRevisionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetLocalRevisionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("LocalRevisionNumber = %d\n", i);
Return values
>= 0The revision number.
-1An error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples:
bversion.cpp.

◆ GetLocalVersionNumber()

int BtrieveVersion::GetLocalVersionNumber ( )

Get the local version number.

Description
Local refers to the instance of PSQL running locally with the caller.
Snippet
// If GetLocalVersionNumber() fails.
if ((i = btrieveVersion.GetLocalVersionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetLocalVersionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("LocalVersionNumber = %d\n", i);
Return values
>= 0The version number.
-1An error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples:
bversion.cpp.

◆ GetLocalVersionType()

Btrieve::VersionType BtrieveVersion::GetLocalVersionType ( )

Get the local version type.

Description
Local refers to the instance of PSQL running locally with the caller.
Snippet
// If GetLocalVersionType() fails.
if ((btrieveVersionType = btrieveVersion.GetLocalVersionType()) == Btrieve::VERSION_TYPE_UNKNOWN)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetLocalVersionType():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("LocalVersionType = %s\n", Btrieve::VersionTypeToString(btrieveVersionType));
Return values
!= Btrieve::VERSION_TYPE_UNKNOWNThe local version type.
= Btrieve::VERSION_TYPE_UNKNOWNAn error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
See also
Btrieve::VersionTypeToString
Examples:
bversion.cpp.

◆ GetRemoteRevisionNumber()

int BtrieveVersion::GetRemoteRevisionNumber ( )

Get the remote revision number.

Description
Remote refers to the instance of PSQL used to access the optionally supplied Btrieve file.
Snippet
// If GetRemoteRevisionNumber() fails.
if ((i = btrieveVersion.GetRemoteRevisionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetRemoteRevisionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("RemoteRevisionNumber = %d\n", i);
Return values
>= 0The revision number.
-1An error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples:
bversion.cpp.

◆ GetRemoteVersionNumber()

int BtrieveVersion::GetRemoteVersionNumber ( )

Get the remote version number.

Description
Remote refers to the instance of PSQL used to access the optionally supplied Btrieve file.
Snippet
// If GetRemoteVersionNumber() fails.
if ((i = btrieveVersion.GetRemoteVersionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetRemoteVersionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("RemoteVersionNumber = %d\n", i);
Return values
>= 0The version number.
-1An error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
Examples:
bversion.cpp.

◆ GetRemoteVersionType()

Btrieve::VersionType BtrieveVersion::GetRemoteVersionType ( )

Get the remote version type.

Description
Remote refers to the instance of PSQL used to access the optionally supplied Btrieve file.
Snippet
// If GetRemoteVersionType() fails.
if ((btrieveVersionType = btrieveVersion.GetRemoteVersionType()) == Btrieve::VERSION_TYPE_UNKNOWN)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetRemoteVersionType():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
printf("RemoteVersionType = %s\n", Btrieve::VersionTypeToString(btrieveVersionType));
Return values
!= Btrieve::VERSION_TYPE_UNKNOWNThe remote version type.
= Btrieve::VERSION_TYPE_UNKNOWNAn error has occurred. Use BtrieveVersion::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.
See also
Btrieve::VersionTypeToString
Examples:
bversion.cpp.