GEOS
Public Member Functions | Public Attributes | List of all members
geos::dataRepository::DataContext::ToStringInfo Struct Reference

#include <DataContext.hpp>

Public Member Functions

 ToStringInfo (string_view targetName, string_view filePath, size_t line)
 Construct a new ToStringInfo object from a DataContext that has input file info. More...
 
 ToStringInfo (string_view targetName)
 Construct a new ToStringInfo object from a DataContext that has no input file info. More...
 
bool hasInputFileInfo () const
 

Public Attributes

string m_targetName
 the targetName of the DataContext
 
string m_filePath
 the file path of the DataFileContext, if it exists (an empty string otherwise)
 
size_t m_line = xmlWrapper::xmlDocument::npos
 the file line of the DataFileContext, if it exists (an empty string otherwise)
 

Detailed Description

This struct exposes the raw data of a DataContext instance that toString() need in order to format it. This struct lifetime depends on that of the source DataContext. The DataContext is considered constant.

Definition at line 83 of file DataContext.hpp.

Constructor & Destructor Documentation

◆ ToStringInfo() [1/2]

geos::dataRepository::DataContext::ToStringInfo::ToStringInfo ( string_view  targetName,
string_view  filePath,
size_t  line 
)

Construct a new ToStringInfo object from a DataContext that has input file info.

Parameters
targetNamethe target name
filePaththe input file path where the target is declared.
linethe line in the file where the target is declared.

◆ ToStringInfo() [2/2]

geos::dataRepository::DataContext::ToStringInfo::ToStringInfo ( string_view  targetName)

Construct a new ToStringInfo object from a DataContext that has no input file info.

Parameters
targetNamethe target name.

Member Function Documentation

◆ hasInputFileInfo()

bool geos::dataRepository::DataContext::ToStringInfo::hasInputFileInfo ( ) const
inline
Returns
true if a location has been found to declare the target in an input file.

Definition at line 107 of file DataContext.hpp.


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