cprover
type.h File Reference

Defines typet, type_with_subtypet and type_with_subtypest. More...

#include "deprecate.h"
#include "source_location.h"
#include "validate_types.h"
#include "validation_mode.h"
+ Include dependency graph for type.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  typet
 The type of an expression, extends irept. More...
 
class  type_with_subtypet
 Type with a single subtype. More...
 
class  type_with_subtypest
 Type with multiple subtypes. More...
 

Macros

#define forall_subtypes(it, type)
 
#define Forall_subtypes(it, type)
 

Functions

const type_with_subtypetto_type_with_subtype (const typet &type)
 
type_with_subtypetto_type_with_subtype (typet &type)
 
const type_with_subtypestto_type_with_subtypes (const typet &type)
 
type_with_subtypestto_type_with_subtypes (typet &type)
 
typet remove_const (typet type)
 Remove const qualifier from type (if any). More...
 

Detailed Description

Defines typet, type_with_subtypet and type_with_subtypest.

Definition in file type.h.

Macro Definition Documentation

◆ forall_subtypes

#define forall_subtypes (   it,
  type 
)
Value:
if((type).has_subtypes()) /* NOLINT(readability/braces) */ \
for(type_with_subtypest::subtypest::const_iterator it=to_type_with_subtypes(type).subtypes().begin(), \
it##_end=to_type_with_subtypes(type).subtypes().end(); \
it!=it##_end; ++it)

Definition at line 216 of file type.h.

◆ Forall_subtypes

#define Forall_subtypes (   it,
  type 
)
Value:
if((type).has_subtypes()) /* NOLINT(readability/braces) */ \
for(type_with_subtypest::subtypest::iterator it=to_type_with_subtypes(type).subtypes().begin(); \
it!=to_type_with_subtypes(type).subtypes().end(); ++it)

Definition at line 222 of file type.h.

Function Documentation

◆ remove_const()

typet remove_const ( typet  type)

Remove const qualifier from type (if any).

Returns type as is if there is no const qualifier.

Definition at line 32 of file type.cpp.

◆ to_type_with_subtype() [1/2]

const type_with_subtypet& to_type_with_subtype ( const typet type)
inline

Definition at line 162 of file type.h.

◆ to_type_with_subtype() [2/2]

type_with_subtypet& to_type_with_subtype ( typet type)
inline

Definition at line 168 of file type.h.

◆ to_type_with_subtypes() [1/2]

const type_with_subtypest& to_type_with_subtypes ( const typet type)
inline

Definition at line 206 of file type.h.

◆ to_type_with_subtypes() [2/2]

type_with_subtypest& to_type_with_subtypes ( typet type)
inline

Definition at line 211 of file type.h.

to_type_with_subtypes
const type_with_subtypest & to_type_with_subtypes(const typet &type)
Definition: type.h:206
type_with_subtypest::subtypes
subtypest & subtypes()
Definition: type.h:191