GEOS
Public Member Functions | List of all members
geos::dataRepository::DataFileContext Class Referencefinal

#include <DataContext.hpp>

Inheritance diagram for geos::dataRepository::DataFileContext:
Inheritance graph
[legend]

Public Member Functions

 DataFileContext (xmlWrapper::xmlNode const &targetNode, xmlWrapper::xmlNodePos const &nodePos)
 Construct the file context of a Group from an xml node. More...
 
 DataFileContext (xmlWrapper::xmlNode const &targetNode, xmlWrapper::xmlAttribute const &att, xmlWrapper::xmlAttributePos const &attPos)
 Construct the file context of a Group from an xml node. More...
 
 DataFileContext (string_view targetName, string_view file, size_t line)
 Constructs the file context of a Group from a C++ source file. More...
 
string toString () const override
 
string getTypeName () const
 
string getFilePath () const
 
size_t getLine () const
 
size_t getOffsetInLine () const
 
size_t getOffset () const
 
- Public Member Functions inherited from geos::dataRepository::DataContext
 DataContext (string_view targetName)
 Construct a new DataContext object. More...
 
virtual ~DataContext ()
 Destroy the DataContext object.
 
string getTargetName () const
 

Additional Inherited Members

- Protected Attributes inherited from geos::dataRepository::DataContext
string const m_targetName
 

Detailed Description

Stores information to retrieve where a target object has been declared in the input source file (e.g. XML).

Definition at line 126 of file DataContext.hpp.

Constructor & Destructor Documentation

◆ DataFileContext() [1/3]

geos::dataRepository::DataFileContext::DataFileContext ( xmlWrapper::xmlNode const &  targetNode,
xmlWrapper::xmlNodePos const &  nodePos 
)

Construct the file context of a Group from an xml node.

Parameters
targetNodethe target object xml node
nodePosthe target object xml node position

◆ DataFileContext() [2/3]

geos::dataRepository::DataFileContext::DataFileContext ( xmlWrapper::xmlNode const &  targetNode,
xmlWrapper::xmlAttribute const &  att,
xmlWrapper::xmlAttributePos const &  attPos 
)

Construct the file context of a Group from an xml node.

Parameters
targetNodethe xml node containing the xml attribute
attthe target object xml attribute
attPosthe target object xml attribute position

◆ DataFileContext() [3/3]

geos::dataRepository::DataFileContext::DataFileContext ( string_view  targetName,
string_view  file,
size_t  line 
)

Constructs the file context of a Group from a C++ source file.

Parameters
targetNameThe name of the target Group.
fileThe name of the source file.
lineThe line number in the source file.

Member Function Documentation

◆ getFilePath()

string geos::dataRepository::DataFileContext::getFilePath ( ) const
inline
Returns
the source file path where the target object has been declared.

Definition at line 167 of file DataContext.hpp.

◆ getLine()

size_t geos::dataRepository::DataFileContext::getLine ( ) const
inline
Returns
the line (starting from 1) where the target object has been declared in the source file.

Definition at line 173 of file DataContext.hpp.

◆ getOffset()

size_t geos::dataRepository::DataFileContext::getOffset ( ) const
inline
Returns
the character offset (starting from 0) in the source file path where the target object has been declared.

Definition at line 187 of file DataContext.hpp.

◆ getOffsetInLine()

size_t geos::dataRepository::DataFileContext::getOffsetInLine ( ) const
inline
Returns
the character offset in the line (starting from 1) where the target object has been declared in the source file.

Definition at line 180 of file DataContext.hpp.

◆ getTypeName()

string geos::dataRepository::DataFileContext::getTypeName ( ) const
inline
Returns
the type name in the source file (XML node tag name / attribute name).

Definition at line 161 of file DataContext.hpp.

◆ toString()

string geos::dataRepository::DataFileContext::toString ( ) const
overridevirtual
Returns
the target object name followed by the the file and line declaring it.

Implements geos::dataRepository::DataContext.


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