Clingo
Loading...
Searching...
No Matches
Clingo::Library Class Reference

The main library class for managing global information and logging. More...

#include <core.hh>

Public Member Functions

 Library (LibraryFlags flags=LibraryFlags::none, Logger logger=nullptr, LogLevel level=LogLevel::info, size_t limit=default_message_limit)
 Constructs a library object.
 
 Library (clingo_lib_t *rep, bool acquire)
 Constructs a library object from an existing C representation.
 

Friends

auto c_cast (Library const &lib) -> clingo_lib_t *
 Casts the library object to its C representation.
 

Detailed Description

The main library class for managing global information and logging.

Library objects are reference counted. If the last reference goes out of scope, all contained symbols are freed.

Constructor & Destructor Documentation

◆ Library() [1/2]

Clingo::Library::Library ( LibraryFlags  flags = LibraryFlags::none,
Logger  logger = nullptr,
LogLevel  level = LogLevel::info,
size_t  limit = default_message_limit 
)
inlineexplicit

Constructs a library object.

Parameters
flagsthe flags to create the library with
loggerthe logger to use for messages; if nullptr, the default logger is used
levelthe log level for the logger
limitthe message limit for the logger; defaults to default_message_limit

◆ Library() [2/2]

Clingo::Library::Library ( clingo_lib_t rep,
bool  acquire 
)
inlineexplicit

Constructs a library object from an existing C representation.

For internal use.

Parameters
repthe C representation of the library object
acquirewhether to acquire the library object

Friends And Related Symbol Documentation

◆ c_cast

auto c_cast ( Library const lib) -> clingo_lib_t *
friend

Casts the library object to its C representation.

Parameters
libthe library object to cast
Returns
the C representation of the library object

The documentation for this class was generated from the following file: