souffle  2.0.2-371-g6315b36
Data Structures | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
souffle::t_nullaries Class Reference

Nullary relations. More...

#include <CompiledSouffle.h>

Collaboration diagram for souffle::t_nullaries:
Collaboration graph

Data Structures

struct  context
 
class  iterator
 

Public Types

using t_tuple = Tuple< RamDomain, 0 >
 

Public Member Functions

iterator begin () const
 
bool contains (const t_tuple &) const
 
bool contains (const t_tuple &, context &) const
 
context createContext ()
 
bool empty () const
 
iterator end () const
 
bool insert ()
 
void insert (const RamDomain *)
 
void insert (const t_tuple &)
 
void insert (const t_tuple &, context &)
 
void printStatistics (std::ostream &) const
 
void purge ()
 
std::size_t size () const
 
 t_nullaries ()=default
 

Static Public Attributes

static constexpr Relation::arity_type Arity = 0
 

Private Attributes

std::atomic< bool > data {false}
 

Detailed Description

Nullary relations.

Definition at line 186 of file CompiledSouffle.h.

Member Typedef Documentation

◆ t_tuple

Definition at line 194 of file CompiledSouffle.h.

Constructor & Destructor Documentation

◆ t_nullaries()

souffle::t_nullaries::t_nullaries ( )
default

Member Function Documentation

◆ begin()

iterator souffle::t_nullaries::begin ( ) const
inline

Definition at line 230 of file CompiledSouffle.h.

230  {
231  data = true;
232  }

References data.

◆ contains() [1/2]

bool souffle::t_nullaries::contains ( const t_tuple ) const
inline

Definition at line 250 of file CompiledSouffle.h.

250  {
251  return data ? 1 : 0;
252  }

References data.

◆ contains() [2/2]

bool souffle::t_nullaries::contains ( const t_tuple ,
context  
) const
inline

Definition at line 253 of file CompiledSouffle.h.

253  {
254  return !data;
255  }

References data.

◆ createContext()

context souffle::t_nullaries::createContext ( )
inline

Definition at line 196 of file CompiledSouffle.h.

196  :
197  typedef std::forward_iterator_tag iterator_category;
198  using value_type = RamDomain*;

◆ empty()

bool souffle::t_nullaries::empty ( ) const
inline

Definition at line 259 of file CompiledSouffle.h.

259  {}
260 };
261 

◆ end()

iterator souffle::t_nullaries::end ( ) const
inline

Definition at line 233 of file CompiledSouffle.h.

233  {
234  data = true;
235  }

References data.

◆ insert() [1/4]

bool souffle::t_nullaries::insert ( )
inline

Definition at line 245 of file CompiledSouffle.h.

247  {
248  return data;
249  }

◆ insert() [2/4]

void souffle::t_nullaries::insert ( const RamDomain )
inline

Definition at line 242 of file CompiledSouffle.h.

244  {

◆ insert() [3/4]

void souffle::t_nullaries::insert ( const t_tuple )
inline

Definition at line 236 of file CompiledSouffle.h.

236  {
237  data = true;
238  }

References data.

◆ insert() [4/4]

void souffle::t_nullaries::insert ( const t_tuple ,
context  
)
inline

Definition at line 239 of file CompiledSouffle.h.

239  {
240  bool result = data;
241  data = true;

References data.

◆ printStatistics()

void souffle::t_nullaries::printStatistics ( std::ostream &  ) const
inline

Definition at line 265 of file CompiledSouffle.h.

265 :
266  static constexpr Relation::arity_type Arity = Arity_;

◆ purge()

void souffle::t_nullaries::purge ( )
inline

Definition at line 262 of file CompiledSouffle.h.

264  {

◆ size()

std::size_t souffle::t_nullaries::size ( ) const
inline

Definition at line 256 of file CompiledSouffle.h.

256  {
257  data = false;
258  }

References data.

Field Documentation

◆ Arity

constexpr Relation::arity_type souffle::t_nullaries::Arity = 0
staticconstexpr

Definition at line 191 of file CompiledSouffle.h.

Referenced by souffle::RelationWrapper< RelType >::purge().

◆ data

std::atomic<bool> souffle::t_nullaries::data {false}
private

The documentation for this class was generated from the following file:
souffle::RamDomain
int32_t RamDomain
Definition: RamTypes.h:56
souffle::t_nullaries::Arity
static constexpr Relation::arity_type Arity
Definition: CompiledSouffle.h:191
souffle::Relation::arity_type
uint32_t arity_type
Definition: SouffleInterface.h:51
souffle::t_nullaries::data
std::atomic< bool > data
Definition: CompiledSouffle.h:188