SliceField Class Reference

Represents a single string in a slice tuple, indicating that a RecordArray should be replaced by one of its fields. More...

#include <Slice.h>

Inheritance diagram for SliceField:
SliceItem

Public Member Functions

 SliceField (const std::string &key)
 Creates a SliceField from a full set of parameters. More...
 
const std::string key () const
 The name of the field to select. More...
 
const SliceItemPtr shallow_copy () const override
 Copies this node without copying any associated arrays. More...
 
const std::string tostring () const override
 Returns a string representation of this slice item (single-line custom format). More...
 
bool preserves_type (const Index64 &advanced) const override
 Returns true if this slice would preserve an array's slice and therefore should pass on Content::parameters. More...
 
virtual bool referentially_equal (const SliceItemPtr &other) const override
 Returns true if this slice item has all the same buffers and parameters as other; false otherwise. More...
 
- Public Member Functions inherited from SliceItem
virtual ~SliceItem ()
 Virtual destructor acts as a first non-inline virtual function that determines a specific translation unit in which vtable shall be emitted. More...
 

Detailed Description

Represents a single string in a slice tuple, indicating that a RecordArray should be replaced by one of its fields.

Represents a list of strings in a slice tuple, indicating that a RecordArray should be replaced by a subset of its fields.

Constructor & Destructor Documentation

◆ SliceField()

SliceField ( const std::string &  key)

Creates a SliceField from a full set of parameters.

Parameters
keyThe name of the field to select. This may be an element of a RecordArray::recordlookup or a RecordArray::fieldindex integer as a string.

Member Function Documentation

◆ key()

const std::string key ( ) const

The name of the field to select.

This may be an element of a RecordArray::recordlookup or a RecordArray::fieldindex integer as a string.

◆ preserves_type()

bool preserves_type ( const Index64 advanced) const
overridevirtual

Returns true if this slice would preserve an array's slice and therefore should pass on Content::parameters.

Parameters
advancedThe index that is passed through Content::getitem_next.

Always false for SliceField.

Implements SliceItem.

◆ referentially_equal()

virtual bool referentially_equal ( const SliceItemPtr other) const
overridevirtual

Returns true if this slice item has all the same buffers and parameters as other; false otherwise.

Parameters
otherThe slice item to compare this with.

Implements SliceItem.

◆ shallow_copy()

const SliceItemPtr shallow_copy ( ) const
overridevirtual

Copies this node without copying any associated arrays.

Implements SliceItem.

◆ tostring()

const std::string tostring ( ) const
overridevirtual

Returns a string representation of this slice item (single-line custom format).

Implements SliceItem.


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