Class CContext#

Class Documentation#

class CContext#

Source code context.

Unnamed Group

inline CSource &Source()#

Get source access.

Returns:

Reference to the source code.

inline const CSource &Source() const#

Get source access.

Returns:

Reference to the source code.

Unnamed Group

inline CCodePos &Code()#

Get code access.

Returns:

Reference to the code position.

inline const CCodePos &Code() const#

Get code access.

Returns:

Reference to the code position.

Public Functions

CContext(const std::filesystem::path &rpath, sdv::idl::IEntityContext::ELocation eLocation = sdv::idl::IEntityContext::ELocation::source)#

Constructor using a path.

Parameters:
  • rpath[in] Reference to the path of the file.

  • eLocation[in] The location of the file to parse.

CContext(const char *szCode)#

Constructor using code.

Parameters:

szCode[in] Zero terminated string containing the code to set.

CContext(const CContext&) = delete#

Copy constructor.

CContext(CContext &&rContext) noexcept#

Move constructor.

Parameters:

rContext[inout] Reference to the source code context.

~CContext()#

Destructor.

CContext &operator=(const CContext&) = delete#

Assignment operator.

Returns:

Returns a reference to this object.

CContext &operator=(CContext &&rContext) noexcept#

Move operator.

Parameters:

rContext[inout] Reference to the source code structure.

Returns:

Returns a reference to this object.

bool operator==(const CContext &rContext) const#

Compare for equal context.

Parameters:

rContext[in] Reference to the source code structure.

Returns:

Returns the comparison result.

bool operator!=(const CContext &rContext) const#

Compare for inequal context.

Parameters:

rContext[in] Reference to the source code structure.

Returns:

Returns the comparison result.

inline sdv::idl::IEntityContext::ELocation GetLocation() const#

Get the code location.

Returns:

Returns the code location.