Skip to content

Universal client software for IRBIS64 library automation system (ManagedClient ported to plain C++11)

License

Notifications You must be signed in to change notification settings

amironov73/PlusIrbis

Repository files navigation

Pure C++ library for IRBIS64 system

Universal client software for IRBIS64 library automation system (ManagedClient ported to plain C++ 11).

Features

  • Contains no references for external components. Doesn't require irbis64_client.dll.
  • Can be compiled as static library (.lib or .a) and as dynamic library (.dll or .so).
  • Supports both simple and complex search for database records with optional formatting.
  • Supports records creation and/or modification. Database records can be updated too.
  • Support for database dictionary listing for terms and postings.
  • Administrator functions: get list of (active) users, create/delete user, create/delete database and so on.

Supported platforms and compilers

  • 32-bit and 64-bit Windows (XP, 7, 8, 8.1, 10);
  • MacOS X 10.14 (64-bit);
  • 32-bit and 64-bit Linux (CentOS 7/8);
  • 64-bit FreeBSD (starting with version 11);
  • MSVS 2015/2017/2019 Community Edition on Windows;
  • CMake 2.8 or higher on Linux.
  • GCC 4.8 or higher both on Windows (MinGW) and Linux/OS X;
  • Clang compiler 9 both on Windows and Linux;
  • Intel C++ compiler 19 on Windows, Linux/OS X.

Simple example

#include "irbis.h"

#include <iostream>
#include <string>

#pragma comment (lib, "irbis.lib") // autolink hack

int main()
{
    std::wcout.imbue ( std::locale ("") ); // for cyrillic output

    irbis::Connection connection;
    connection.host = L"192.168.1.35";
    connection.port = 6666;
    connection.username = L"librarian";
    connection.password = L"secret";

    const auto isConnected = connection.connect();
    std::wcout << L"connected: " << isConnected << std::endl;
    if (!isConnected) {
        return -1;
    }

    const auto version = connection.getServerVersion();
    std::wcout << L"Version: " << version.version << std::endl;

    const auto maxMfn = connection.getMaxMfn (L"IBIS");
    std::wcout << L"max MFN: " << maxMfn << std::endl;

    const auto formatted = connection.formatRecord (L"@brief", 1);
    std::wcout << L"FORMAT: " << formatted << std::endl;

    const auto record = connection.readRecord (1);
    std::wcout << L"READ: "  << record.fm (200, 'a') << std::endl;

    irbis::MfnList found = connection.search (L"K=alg$");
    std::wcout << L"SEARCH:";
    for (auto mfn : found) {
        std::wcout << L" " << mfn;
    }
    std::wcout << std::endl;

    connection.disconnect();
    std::wcout << L"disconnected" << std::endl;

    return 0;
}

Links

Build status

Issues Build status Build status

Coverity Scan

Documentation (in russian)

About

Universal client software for IRBIS64 library automation system (ManagedClient ported to plain C++11)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published