CBMC
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
struct_typet Class Reference

Structure type, corresponds to C style structs. More...

#include <std_types.h>

+ Inheritance diagram for struct_typet:
+ Collaboration diagram for struct_typet:

Classes

class   baset
  Base class or struct that a class or struct inherits from. More...
 

Public Types

typedef std::vector< basetbasest
 
- Public Types inherited from struct_union_typet
typedef std::vector< componenttcomponentst
 
- Public Types inherited from irept
 
 
 
 
  Used to refer to this class from derived classes.
 

Public Member Functions

 
 
  Returns true if the struct is a prefix of other, i.e., if this struct has n components then the component types and names of this struct must match the first n components of other struct.
 
  A struct may be a class, where members may have access restrictions.
 
  Get the collection of base classes/structs.
 
basestbases ()
  Get the collection of base classes/structs.
 
  Add a base class/struct.
 
std::optional< basetget_base (const irep_idt &id) const
  Return the base with the given name, if exists.
 
  Test whether id is a base class/struct.
 
- Public Member Functions inherited from struct_union_typet
 
 
 
 
bool  has_component (const irep_idt &component_name) const
 
  Get the reference to a component with given name.
 
std::size_t  component_number (const irep_idt &component_name) const
  Return the sequence number of the component with given name.
 
const typetcomponent_type (const irep_idt &component_name) const
 
 
 
  A struct may be a class, where members may have access restrictions.
 
  Return the access specification for members where access has not been modified.
 
  A struct/union may be incomplete.
 
  A struct/union may be incomplete.
 
- Public Member Functions inherited from typet
  typet ()
 
 
 
 
 
 
 
 
 
  This is a 'fluent style' method for creating a new type with an added-on source location.
 
  This is a 'fluent style' method for adding a source location.
 
  This is a 'fluent style' method for creating a new type with an added-on source location.
 
  This is a 'fluent style' method for adding a source location.
 
 
 
- Public Member Functions inherited from irept
 
 
 
 
  irept ()=default
 
 
const std::string &  id_string () const
 
void  id (const irep_idt &_data)
 
 
ireptadd (const irep_idt &name)
 
ireptadd (const irep_idt &name, irept irep)
 
const std::string &  get_string (const irep_idt &name) const
 
 
 
 
std::size_t  get_size_t (const irep_idt &name) const
 
 
void  set (const irep_idt &name, const irep_idt &value)
 
void  set (const irep_idt &name, irept irep)
 
void  set (const irep_idt &name, const long long value)
 
void  set_size_t (const irep_idt &name, const std::size_t value)
 
 
 
 
 
 
void  swap (irept &irep)
 
  defines ordering on the internal representation
 
  defines ordering on the internal representation
 
  defines ordering on the internal representation comments are ignored
 
void  clear ()
 
 
subtget_sub ()
 
 
 
 
std::size_t  hash () const
 
std::size_t  full_hash () const
 
 
std::string  pretty (unsigned indent=0, unsigned max_indent=0) const
 
- Public Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 
 
 
 
 
 
 
 
const dtread () const
 
dtwrite ()
 

Additional Inherited Members

- Static Public Member Functions inherited from typet
  Check that the type is well-formed (shallow checks only, i.e., subtypes are not checked)
 
  Check that the type is well-formed, assuming that its subtypes have already been checked for well-formedness.
 
  Check that the type is well-formed (full check, including checks of subtypes)
 
- Static Public Member Functions inherited from irept
 
  count the number of named_sub elements that are not comments
 
- Protected Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
void  detach ()
 
- Static Protected Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 
  Does the same as remove_ref, but using an explicit stack instead of recursion.
 
dtdata
 
- Static Protected Attributes inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 

Detailed Description

Structure type, corresponds to C style structs.

Definition at line 229 of file std_types.h.

Member Typedef Documentation

◆  basest

Definition at line 258 of file std_types.h.

Constructor & Destructor Documentation

◆  struct_typet() [1/2]

struct_typet::struct_typet ( )
inline

Definition at line 232 of file std_types.h.

◆  struct_typet() [2/2]

struct_typet::struct_typet ( componentst  _components )
inlineexplicit

Definition at line 236 of file std_types.h.

Member Function Documentation

◆  add_base()

void struct_typet::add_base ( const struct_tag_typetbase )

Add a base class/struct.

Parameters
base Type of case/class struct to be added.

Definition at line 99 of file std_types.cpp.

◆  bases() [1/2]

basest & struct_typet::bases ( )
inline

Get the collection of base classes/structs.

Definition at line 267 of file std_types.h.

◆  bases() [2/2]

const basest & struct_typet::bases ( ) const
inline

Get the collection of base classes/structs.

Definition at line 261 of file std_types.h.

◆  get_base()

std::optional< struct_typet::baset > struct_typet::get_base ( const irep_idtid ) const

Return the base with the given name, if exists.

Parameters
id The name of the base we are looking for.
Returns
The base if exists.

Definition at line 105 of file std_types.cpp.

◆  has_base()

bool struct_typet::has_base ( const irep_idtid ) const
inline

Test whether id is a base class/struct.

Parameters
id symbol type name
Returns
True if, and only if, the symbol type id is a base class/struct.

Definition at line 284 of file std_types.h.

◆  is_class()

bool struct_typet::is_class ( ) const
inline

A struct may be a class, where members may have access restrictions.

Definition at line 244 of file std_types.h.

◆  is_prefix_of()

bool struct_typet::is_prefix_of ( const struct_typetother ) const

Returns true if the struct is a prefix of other, i.e., if this struct has n components then the component types and names of this struct must match the first n components of other struct.

Parameters
other Struct type to compare with.

Definition at line 119 of file std_types.cpp.


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

AltStyle によって変換されたページ (->オリジナル) /