JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Protected Attributes
IDPositionOrigin Class Referenceabstract

#include <IDPositionOrigin.h>

Inheritance diagram for IDPositionOrigin:
[legend]
Collaboration diagram for IDPositionOrigin:
[legend]

Public Member Functions

 IDPositionOrigin (FILEID id)
 
 IDPositionOrigin (FILEID id, long start, long end, int index)
 
std::unique_ptr< RJDocumentreparse (RJMemoryPoolAlloc &alloc) const override
 
bool isReparsable () const override
 
virtual ~IDPositionOrigin () override=default
 
long getStart () const
 
void setStart (long start)
 
long getEnd () const
 
void setEnd (long end)
 
int getIndex () const
 
void setIndex (int index)
 
virtual std::string getStreamName () const =0
 
std::string toString () const override=0
 
std::unique_ptr< IOriginclone () const override=0
 
virtual bool operator< (const IOrigin &x) const override final
 
bool operator< (const IDPositionOrigin &other) const
 
bool operator== (const IDPositionOrigin &other) const
 
- Public Member Functions inherited from IOrigin
virtual ~IOrigin ()=default
 
bool operator== (const IOrigin &x) const
 
virtual bool operator<= (const IOrigin &x) const
 
virtual bool operator> (const IOrigin &x) const
 
virtual bool operator>= (const IOrigin &x) const
 

Protected Attributes

FILEID id
 
long start {}
 
long end {}
 
int index {}
 

Detailed Description

Interface representing a origin that can be represented by an ID and two offsets (for example files/static webfiles/...)

Constructor & Destructor Documentation

◆ IDPositionOrigin() [1/2]

IDPositionOrigin::IDPositionOrigin ( FILEID  id)

◆ IDPositionOrigin() [2/2]

IDPositionOrigin::IDPositionOrigin ( FILEID  id,
long  start,
long  end,
int  index 
)

◆ ~IDPositionOrigin()

virtual IDPositionOrigin::~IDPositionOrigin ( )
overridevirtualdefault

Member Function Documentation

◆ clone()

std::unique_ptr<IOrigin> IDPositionOrigin::clone ( ) const
overridepure virtual

Clones the IOrigin for use in another document

Returns
New IOrigin with the same parameters.

Implements IOrigin.

Implemented in URLOrigin, and FileOrigin.

◆ getEnd()

long IDPositionOrigin::getEnd ( ) const

◆ getIndex()

int IDPositionOrigin::getIndex ( ) const

◆ getStart()

long IDPositionOrigin::getStart ( ) const

◆ getStreamName()

virtual std::string IDPositionOrigin::getStreamName ( ) const
pure virtual

Returns a human readable representation of the ID (without the offsets)

Returns

Implemented in URLOrigin, and FileOrigin.

◆ isReparsable()

bool IDPositionOrigin::isReparsable ( ) const
overridevirtual

Returns if the IOrigin is reparsable

Returns
true, if yes, false if not

Reimplemented from IOrigin.

Reimplemented in URLOrigin.

◆ operator<() [1/2]

bool IDPositionOrigin::operator< ( const IDPositionOrigin other) const

◆ operator<() [2/2]

bool IDPositionOrigin::operator< ( const IOrigin x) const
finaloverridevirtual

Reimplemented from IOrigin.

◆ operator==()

bool IDPositionOrigin::operator== ( const IDPositionOrigin other) const

◆ reparse()

std::unique_ptr< RJDocument > IDPositionOrigin::reparse ( RJMemoryPoolAlloc alloc) const
overridevirtual

Reparses the origin into a new RJDocument. The allocator is used to increase performance

Parameters
allocAllocator used for allocating memoty
Returns
Reparsed RJDocument, or nullpointer if not reparsable

Reimplemented from IOrigin.

Reimplemented in URLOrigin.

◆ setEnd()

void IDPositionOrigin::setEnd ( long  end)

◆ setIndex()

void IDPositionOrigin::setIndex ( int  index)

◆ setStart()

void IDPositionOrigin::setStart ( long  start)
Here is the caller graph for this function:

◆ toString()

std::string IDPositionOrigin::toString ( ) const
overridepure virtual

Returns a textual representation of the IOrigin

Returns

Implements IOrigin.

Implemented in URLOrigin, and FileOrigin.

Field Documentation

◆ end

long IDPositionOrigin::end {}
protected

◆ id

FILEID IDPositionOrigin::id
protected

◆ index

int IDPositionOrigin::index {}
protected

◆ start

long IDPositionOrigin::start {}
protected

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