Btrieve 2
Loading...
Searching...
No Matches
BtrieveVersion Class Reference

The Btrieve version class. More...

#include <btrieveCpp.h>

Public Member Functions

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

Detailed Description

The Btrieve version class.

Examples
bversion.cpp.

Constructor & Destructor Documentation

◆ BtrieveVersion()

BtrieveVersion::BtrieveVersion ( )
Snippet
C++ bversion.cpp
BtrieveVersion btrieveVersion;
Python bversion.py
btrieveVersion = btrievePython.BtrieveVersion()
assert(btrieveVersion != None)
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 Zen used by the caller.
Snippet
C++ bversion.cpp
// 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);
Python bversion.py
rc = btrieveVersion.GetClientRevisionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetClientRevisionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen used by the caller.
Snippet
C++ bversion.cpp
// 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);
Python bversion.py
rc = btrieveVersion.GetClientVersionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetClientVersionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen used by the caller.
Snippet
C++ bversion.cpp
// 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));
Python bversion.py
rc = btrieveVersion.GetClientVersionType()
assert(rc != btrievePython.Btrieve.VERSION_TYPE_UNKNOWN), "Error: btrieveVersion::GetClientVersionType():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
print("ClientVersionType =", btrievePython.Btrieve_VersionTypeToString(rc))
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.

Note
This method is intended for use following methods which don't return a status code.
Snippet
C++ bversion.cpp
// If GetClientRevisionNumber() fails.
if ((i = btrieveVersion.GetClientRevisionNumber()) < 0)
{
status = btrieveVersion.GetLastStatusCode();
printf("Error: BtrieveVersion::GetClientRevisionNumber():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Python bversion.py
rc = btrieveVersion.GetClientRevisionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetClientRevisionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen running locally with the caller.
Snippet
C++ bversion.cpp
// 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);
Python bversion.py
rc = btrieveVersion.GetLocalRevisionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetLocalRevisionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen running locally with the caller.
Snippet
C++ bversion.cpp
// 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);
Python bversion.py
rc = btrieveVersion.GetLocalVersionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetLocalVersionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen running locally with the caller.
Snippet
C++ bversion.cpp
// 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));
Python bversion.py
rc = btrieveVersion.GetLocalVersionType()
assert(rc != btrievePython.Btrieve.VERSION_TYPE_UNKNOWN), "Error: btrieveVersion::GetLocalVersionType():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
print("LocalVersionType =", btrievePython.Btrieve_VersionTypeToString(rc))
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 Zen used to access the optionally supplied Btrieve file.
Snippet
C++ bversion.cpp
// 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);
Python bversion.py
rc = btrieveVersion.GetRemoteRevisionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetRemoteRevisionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen used to access the optionally supplied Btrieve file.
Snippet
C++ bversion.cpp
// 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);
Python bversion.py
rc = btrieveVersion.GetRemoteVersionNumber()
assert(rc >= 0), "Error: btrieveVersion::GetRemoteVersionNumber():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
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 Zen used to access the optionally supplied Btrieve file.
Snippet
C++ bversion.cpp
// 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));
Python bversion.py
rc = btrieveVersion.GetRemoteVersionType()
assert(rc != btrievePython.Btrieve.VERSION_TYPE_UNKNOWN), "Error: btrieveVersion::GetRemoteVersionType():%d:%s.\n" % (rc, btrievePython.Btrieve_StatusCodeToString(btrieveVersion.GetLastStatusCode()))
print("RemoteVersionType =", btrievePython.Btrieve_VersionTypeToString(rc))
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.