#include <nmv-asm-utils.h>
This is a wrapper type around (a functor) for the call to ui_utils::find_file_and_read_line.
The function call operator of this functor read the line N of a given file F. The functor has context to know where to look for the file F; otherwise it can ask the user (interactively) for help.
◆ ReadLine()
| nemiver::common::ReadLine::ReadLine |
( |
Gtk::Window & |
a_parent, |
|
|
const std::list< UString > & |
where_to_look, |
|
|
list< UString > & |
session_dirs, |
|
|
map< UString, bool > & |
ignore_paths, |
|
|
FindFileAndReadLine |
read_line_func |
|
) |
| |
|
inline |
Constructor for the ReadLine functor.
- Parameters
-
| a_parent | the parent window used by the dialog used by the functor to interact with the user, should the need arise. |
| where_to_look | a list of directories where to look for the file the function call operators of the functor might be interested in. |
| session_dirs | if the file is found in a directory D, that D is put in this list. |
| ignore_path | if the file is not found but is part of this map, do not ask the user for help in finding it. |
| read_line_func | the function to use to do the actual job of finding the file. |
◆ operator()()
| bool nemiver::common::ReadLine::operator() |
( |
const UString & |
a_file_path, |
|
|
int |
a_line_number, |
|
|
std::string & |
a_line |
|
) |
| |
|
inline |
The function-call operator of the functor.
- Parameters
-
| a_file_path | the file to look for. |
| a_line_number | the number of the line of a_file_path to read. |
| a_line | the resulting line read. |
- Returns
- true iff a line was read.
◆ m_ignore_paths
| map<UString, bool>& nemiver::common::ReadLine::m_ignore_paths |
|
protected |
◆ m_parent
| Gtk::Window& nemiver::common::ReadLine::m_parent |
|
protected |
◆ m_session_dirs
| list<UString>& nemiver::common::ReadLine::m_session_dirs |
|
protected |
◆ m_where_to_look
| const std::list<UString>& nemiver::common::ReadLine::m_where_to_look |
|
protected |
◆ read_line
The documentation for this class was generated from the following file: