LibPkg
Public Member Functions | List of all members
pkg::module_info Class Reference

Class to read the header details from a RISC OS Module. More...

#include <module_info.h>

Public Member Functions

 module_info ()
 Construct an uninitialised module_info object Call the read method to initialise it. More...
 
 module_info (const std::string &path)
 Read module information from given path to module file. More...
 
bool read (const std::string &path)
 Read module information from given path to module file. More...
 
bool lookup (const std::string &title)
 Look up module in loaded module list. More...
 
bool read_ok () const
 Check if module information has been update successfully. More...
 
const std::string & title ()
 Get the module title. More...
 
const std::string & help_string ()
 Get module help string. More...
 
std::string version () const
 Get the module version. More...
 

Detailed Description

Class to read the header details from a RISC OS Module.

Constructor & Destructor Documentation

◆ module_info() [1/2]

pkg::module_info::module_info ( )
inline

Construct an uninitialised module_info object Call the read method to initialise it.

References lookup(), read(), and title().

◆ module_info() [2/2]

pkg::module_info::module_info ( const std::string &  path)

Read module information from given path to module file.

Check read_ok() method to see if read succeeded

Parameters
pathfull path to the module to read information from

References read().

Member Function Documentation

◆ read()

bool pkg::module_info::read ( const std::string &  path)

Read module information from given path to module file.

Sets the value returned by read_ok() method

Parameters
pathfull path to the module to read information from
Returns
true if read succeeded, false otherwise

Referenced by module_info().

◆ lookup()

bool pkg::module_info::lookup ( const std::string &  title)

Look up module in loaded module list.

Parameters
moduletitle (Can use "." as a wild card)
Returns
true if module exists

References pkg::os::call_swi(), and pkg::swi::OS_Module.

Referenced by pkg::module_check::module_check(), and module_info().

◆ read_ok()

bool pkg::module_info::read_ok ( ) const
inline

Check if module information has been update successfully.

Returns
true if module information was updated.

Referenced by pkg::unpack::poll().

◆ title()

const std::string& pkg::module_info::title ( )
inline

Get the module title.

Returns
title of the module

Referenced by module_info(), and pkg::unpack::poll().

◆ help_string()

const std::string& pkg::module_info::help_string ( )
inline

Get module help string.

Returns
help string

Referenced by pkg::module_check::module_check(), and pkg::unpack::poll().

◆ version()

std::string pkg::module_info::version ( ) const
inline

Get the module version.

Returns
module version as a string (e.g. 1.23)

Referenced by pkg::unpack::poll().


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

Reference Manual LibPkg Version 0.9.0 (4 Sep 2020)