LatticeHashForest
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Friends | List of all members
lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter > Struct Template Reference

Type for the elements for a property set in the nested. The template arguments are for the 'key' type. More...

#include <lhf.hpp>

Classes

struct  FullEqual
 This forces a comparison of both the key and the value instead of only the key. Required in instances where distinguishing this is necessary (like in the property set storage array) More...
 
struct  Hash
 

Public Types

using InterfaceKeyType = PropertyT
 Key type is made available here if required by user.
 
using InterfaceValueType = PropertyT
 Value type is made available here if required by user.
 

Public Member Functions

 PropertyElement (const PropertyT &key, const ChildValueList &value)
 
const PropertyT & get_key () const
 Gets the 'key' value.
 
const ChildValueListget_value () const
 Gets the nested value. It returns a tuple of values containing indices to each of the nested sets of different LHFs.
 
template<typename Operation , std::size_t... Indices>
void apply_internal (ChildValueList &ret, const LHFReferenceList &lhf, const ChildValueList &arg_value, std::index_sequence< Indices... >) const
 Actually performs the template "apply" operation. This sets up template syntax to go over each element of the tuple statically to execute the operation specified by the Operation template parameter.
 
template<typename Operation >
PropertyElement apply (const LHFReferenceList &lhf, const PropertyElement &arg) const
 Performs the "apply" operation on the list of nested children specified by the Operation parameter.
 
bool operator< (const PropertyElement &b) const
 
bool operator== (const PropertyElement &b) const
 
String to_string () const
 

Public Attributes

PropertyT key
 
ChildValueList value
 

Friends

std::ostream & operator<< (std::ostream &os, const PropertyElement &obj)
 

Detailed Description

template<typename PropertyT, typename ... ChildT>
template<typename PropertyLess, typename PropertyHash, typename PropertyEqual, typename PropertyPrinter>
struct lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >

Type for the elements for a property set in the nested. The template arguments are for the 'key' type.

Template Parameters
PropertyLessCustom less-than comparator (if required)
PropertyHashCustom hasher (if required)
PropertyEqualCustom equality comaparator (if required)
PropertyPrinterPropertyT string representation generator

Definition at line 626 of file lhf.hpp.

Member Typedef Documentation

◆ InterfaceKeyType

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
using lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::InterfaceKeyType = PropertyT

Key type is made available here if required by user.

Definition at line 628 of file lhf.hpp.

◆ InterfaceValueType

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
using lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::InterfaceValueType = PropertyT

Value type is made available here if required by user.

Definition at line 631 of file lhf.hpp.

Constructor & Destructor Documentation

◆ PropertyElement()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::PropertyElement ( const PropertyT &  key,
const ChildValueList value 
)
inline

Definition at line 636 of file lhf.hpp.

Member Function Documentation

◆ apply()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
template<typename Operation >
PropertyElement lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::apply ( const LHFReferenceList lhf,
const PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter > &  arg 
) const
inline

Performs the "apply" operation on the list of nested children specified by the Operation parameter.

Parameters
[in]lhfThe list of references to the LHF.
[in]argThe right-hand side operand.
Template Parameters
OperationThe operation to perform.
Returns
A new PropertyElement that contains the result of the apply operation.

Definition at line 705 of file lhf.hpp.

◆ apply_internal()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
template<typename Operation , std::size_t... Indices>
void lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::apply_internal ( ChildValueList ret,
const LHFReferenceList lhf,
const ChildValueList arg_value,
std::index_sequence< Indices... >   
) const
inline

Actually performs the template "apply" operation. This sets up template syntax to go over each element of the tuple statically to execute the operation specified by the Operation template parameter.

Note
This feature in particular requires C++14 and above.
Parameters
retThe list of results.
[in]lhfThe list of references to the LHF.
[in]arg_valueThe list of values in the right-hand side operand.
Template Parameters
OperationThe operation to perform on each child.
IndicesParameter pack to enable template iteration.

Definition at line 680 of file lhf.hpp.

◆ get_key()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
const PropertyT & lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::get_key ( ) const
inline

Gets the 'key' value.

Returns
The key.

Definition at line 647 of file lhf.hpp.

◆ get_value()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
const ChildValueList & lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::get_value ( ) const
inline

Gets the nested value. It returns a tuple of values containing indices to each of the nested sets of different LHFs.

Returns
The value.

Definition at line 659 of file lhf.hpp.

◆ operator<()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
bool lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::operator< ( const PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter > &  b) const
inline

Definition at line 717 of file lhf.hpp.

◆ operator==()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
bool lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::operator== ( const PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter > &  b) const
inline

Definition at line 721 of file lhf.hpp.

◆ to_string()

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
String lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::to_string ( ) const
inline

Definition at line 725 of file lhf.hpp.

Friends And Related Symbol Documentation

◆ operator<<

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
std::ostream & operator<< ( std::ostream &  os,
const PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter > &  obj 
)
friend

Definition at line 737 of file lhf.hpp.

Member Data Documentation

◆ key

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
PropertyT lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::key

◆ value

template<typename PropertyT , typename ... ChildT>
template<typename PropertyLess , typename PropertyHash , typename PropertyEqual , typename PropertyPrinter >
ChildValueList lhf::NestingBase< PropertyT, ChildT >::PropertyElement< PropertyLess, PropertyHash, PropertyEqual, PropertyPrinter >::value

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