www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
FileLineInfo Class Reference

Holds file and line information. More...

#include <FileLineInfo.h>

Public Member Functions

 FileLineInfo ()
 
 FileLineInfo (const std::string &f, int l)
 
bool isValid () const
 
int line () const
 
std::string file () const
 

Protected Attributes

int _line
 
std::string _file
 

Detailed Description

Holds file and line information.

Definition at line 19 of file FileLineInfo.h.

Constructor & Destructor Documentation

◆ FileLineInfo() [1/2]

FileLineInfo::FileLineInfo ( )

Definition at line 12 of file FileLineInfo.C.

12 : _line(-1) {}

◆ FileLineInfo() [2/2]

FileLineInfo::FileLineInfo ( const std::string &  f,
int  l 
)

Definition at line 14 of file FileLineInfo.C.

14 : _line(l), _file(f) {}
std::string _file
Definition: FileLineInfo.h:33

Member Function Documentation

◆ file()

std::string FileLineInfo::file ( ) const

Definition at line 29 of file FileLineInfo.C.

Referenced by JsonSyntaxTree::addActionTask(), JsonSyntaxTree::addParameters(), and Factory::reg().

30 {
31  return _file;
32 }
std::string _file
Definition: FileLineInfo.h:33

◆ isValid()

bool FileLineInfo::isValid ( ) const
Returns
Whether this holds valid file line information.

Definition at line 17 of file FileLineInfo.C.

Referenced by JsonSyntaxTree::addActionTask(), FileLineInfoMap::addInfo(), and JsonSyntaxTree::addParameters().

18 {
19  return !_file.empty() && _line >= 0;
20 }
std::string _file
Definition: FileLineInfo.h:33

◆ line()

int FileLineInfo::line ( ) const

Definition at line 23 of file FileLineInfo.C.

Referenced by JsonSyntaxTree::addActionTask(), and JsonSyntaxTree::addParameters().

24 {
25  return _line;
26 }

Member Data Documentation

◆ _file

std::string FileLineInfo::_file
protected

Definition at line 33 of file FileLineInfo.h.

Referenced by file(), and isValid().

◆ _line

int FileLineInfo::_line
protected

Definition at line 32 of file FileLineInfo.h.

Referenced by isValid(), and line().


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