P4C
The P4 Compiler
Loading...
Searching...
No Matches
ConstrainedSlice Class Reference

Class representing FieldSlice with constraints, which has handle for constraint logging. Contains non-group constraints. More...

#include <constrained_fields.h>

Inheritance diagram for ConstrainedSlice:
[legend]

Public Member Functions

 ConstrainedSlice (const ConstrainedField &parent, le_bitrange range)
 
const Constraints::AlignmentConstraintgetAlignment () const
 
const Constraints::ContainerSizeConstraint getContainerSize () const
 
const ConstrainedFieldgetParent () const
 
const le_bitrangegetRange () const
 
bool operator< (const ConstrainedSlice &other) const override
 Comparators implementation for LiftCompare.
 
bool operator== (const ConstrainedSlice &other) const override
 
void setAlignment (const Constraints::AlignmentConstraint &alignment)
 Constraints.
 
void setContainerSize (const Constraints::ContainerSizeConstraint &containerSize)
 
- Public Member Functions inherited from LoggableEntity
Constraint * getLogger ()
 
bool hasLoggedConstraints () const
 
- Public Member Functions inherited from LiftCompare< ConstrainedSlice >
 OPERATOR (equal, Equal)
 
 OPERATOR (not_equal, NotEqual)
 
bool operator!= (const ConstrainedSlice &other) const
 
- Public Member Functions inherited from LiftEqual< ConstrainedSlice >
 OPERATOR (equal, Equal)
 
 OPERATOR (not_equal, NotEqual)
 
bool operator!= (const ConstrainedSlice &other) const
 
- Public Member Functions inherited from LiftLess< ConstrainedSlice >
 OPERATOR (equal, Equal)
 
 OPERATOR (greater, Greater)
 
 OPERATOR (greater_equal, GreaterEqual)
 
 OPERATOR (less, Less)
 
 OPERATOR (less_equal, LessEqual)
 
 OPERATOR (not_equal, NotEqual)
 
bool operator!= (const ConstrainedSlice &other) const
 
bool operator<= (const ConstrainedSlice &other) const
 
bool operator== (const ConstrainedSlice &other) const
 
bool operator> (const ConstrainedSlice &other) const
 
bool operator>= (const ConstrainedSlice &other) const
 

Additional Inherited Members

- Public Types inherited from LoggableEntity
using Constraint = Logging::Phv_Schema_Logger::Constraint
 
- Protected Attributes inherited from LoggableEntity
Constraint * logger = nullptr
 

Detailed Description

Class representing FieldSlice with constraints, which has handle for constraint logging. Contains non-group constraints.

Constructor & Destructor Documentation

◆ ConstrainedSlice()

ConstrainedSlice::ConstrainedSlice ( const ConstrainedField & parent,
le_bitrange range )

Copyright (C) 2024 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

Member Function Documentation

◆ operator<()

bool ConstrainedSlice::operator< ( const ConstrainedSlice & other) const
overridevirtual

Comparators implementation for LiftCompare.

Implements LiftLess< ConstrainedSlice >.

◆ operator==()

bool ConstrainedSlice::operator== ( const ConstrainedSlice & other) const
overridevirtual