GEOS
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
geos::dataRepository::DataContext Class Referenceabstract

#include <DataContext.hpp>

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

Classes

struct  ToStringInfo
 

Public Member Functions

 DataContext (string_view targetName)
 Construct a new DataContext object. More...
 
virtual ~DataContext ()
 Destroy the DataContext object.
 
virtual string toString () const =0
 
virtual ErrorContext getContextInfo () const =0
 Returns contextual information, including the file name and the line number. More...
 
 operator ErrorContext () const
 Conversion operator to ErrorContext. More...
 
string getTargetName () const
 

Protected Member Functions

virtual ToStringInfo getToStringInfo () const =0
 This method exposes the raw data of a DataContext, in order to access and format it (notably in toString() implementations that need to access other DataContext instances). More...
 

Protected Attributes

string const m_targetName
 

Friends

class GroupContext
 
class WrapperContext
 
std::ostream & operator<< (std::ostream &os, const DataContext &ctx)
 Insert contextual information in the provided stream.
 

Detailed Description

DataContext is an abstract class storing contextual information on an object:

Definition at line 43 of file DataContext.hpp.

Constructor & Destructor Documentation

◆ DataContext()

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

Construct a new DataContext object.

Parameters
targetNamethe target object name

Member Function Documentation

◆ getContextInfo()

virtual ErrorContext geos::dataRepository::DataContext::getContextInfo ( ) const
pure virtual

Returns contextual information, including the file name and the line number.

Returns
ErrorContext

Implemented in geos::dataRepository::DataFileContext.

◆ getTargetName()

string geos::dataRepository::DataContext::getTargetName ( ) const
inline
Returns
Get the target object name

Definition at line 81 of file DataContext.hpp.

◆ getToStringInfo()

virtual ToStringInfo geos::dataRepository::DataContext::getToStringInfo ( ) const
protectedpure virtual

This method exposes the raw data of a DataContext, in order to access and format it (notably in toString() implementations that need to access other DataContext instances).

Returns
a ToStringInfo struct that contains the raw data contained in this DataContext instance.

◆ operator ErrorContext()

geos::dataRepository::DataContext::operator ErrorContext ( ) const
inlineexplicit

Conversion operator to ErrorContext.

Returns
ErrorContext

Definition at line 74 of file DataContext.hpp.

◆ toString()

virtual string geos::dataRepository::DataContext::toString ( ) const
pure virtual
Returns
A string that mention all the known informations to retrieve from where the target object comes from.

Implemented in geos::dataRepository::DataFileContext.

Member Data Documentation

◆ m_targetName

string const geos::dataRepository::DataContext::m_targetName
protected
See also
getObjectName()

Definition at line 94 of file DataContext.hpp.


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