libabigail
Loading...
Searching...
No Matches
class_tdecl Class Reference

Abstract a class template. More...

#include <abg-ir.h>

Inheritance diagram for class_tdecl:
[legend]

Public Member Functions

 class_tdecl (class_decl_sptr pattern, const location &locus, visibility vis=VISIBILITY_DEFAULT)
 Constructor for the class_tdecl type.
 
 class_tdecl (const environment &env, const location &locus, visibility vis=VISIBILITY_DEFAULT)
 Constructor for the class_tdecl type.
 
shared_ptr< class_declget_pattern () const
 Getter of the pattern of the template.
 
virtual bool operator== (const class_tdecl &) const
 
virtual bool operator== (const decl_base &) const
 Equality operator.
 
virtual bool operator== (const template_decl &) const
 Equality operator.
 
void set_pattern (class_decl_sptr p)
 Setter of the pattern of the template.
 
virtual bool traverse (ir_node_visitor &v)
 This implements the ir_traversable_base::traverse pure virtual function.
 
- Public Member Functions inherited from template_decl
 template_decl (const environment &env, const string &name, const location &locus, visibility vis=VISIBILITY_DEFAULT)
 Constructor.
 
virtual ~template_decl ()
 Destructor.
 
void add_template_parameter (const template_parameter_sptr p)
 Add a new template parameter to the current instance of template_decl.
 
const std::list< template_parameter_sptr > & get_template_parameters () const
 Get the list of template parameters of the current instance of template_decl.
 
- Public Member Functions inherited from decl_base
 decl_base (const environment &, const location &)
 Constructor for the decl_base type.
 
 decl_base (const environment &e, const interned_string &name, const location &locus, const interned_string &mangled_name=interned_string(), visibility vis=VISIBILITY_DEFAULT)
 Constructor.
 
 decl_base (const environment &e, const string &name, const location &locus, const string &mangled_name="", visibility vis=VISIBILITY_DEFAULT)
 Constructor for the decl_base type.
 
virtual ~decl_base ()
 Destructor of the decl_base type.
 
const interned_stringget_cached_pretty_representation (bool internal=false) const
 Get the pretty representation of the current decl.
 
context_relget_context_rel ()
 Getter for the context relationship.
 
const context_relget_context_rel () const
 Getter for the context relationship.
 
const decl_base_sptr get_definition_of_declaration () const
 If this decl_base is declaration-only, get its definition, if any.
 
const decl_base_sptr get_earlier_declaration () const
 If this decl_base is a definition, get its earlier declaration.
 
bool get_has_anonymous_parent () const
 Get the "has_anonymous_parent" flag of the current declaration.
 
bool get_is_anonymous () const
 Test if the current declaration is anonymous.
 
bool get_is_anonymous_or_has_anonymous_parent () const
 
bool get_is_declaration_only () const
 Test if a decl_base is a declaration-only decl.
 
bool get_is_in_public_symbol_table () const
 Test if the decl is defined in a ELF symbol table as a public symbol.
 
const interned_stringget_linkage_name () const
 Getter for the mangled name.
 
const locationget_location () const
 Get the location of a given declaration.
 
const decl_baseget_naked_definition_of_declaration () const
 If this decl_base is declaration-only, get its definition, if any.
 
virtual const interned_stringget_name () const
 Getter for the name of the current decl.
 
typedef_decl_sptr get_naming_typedef () const
 Getter for the naming typedef of the current decl.
 
virtual string get_pretty_representation (bool internal=false, bool qualified_name=true) const
 Get the pretty representatin of the current declaration.
 
virtual const interned_stringget_qualified_name (bool internal=false) const
 Return the qualified name of the decl.
 
virtual void get_qualified_name (interned_string &qualified_name, bool internal=false) const
 Compute the qualified name of the decl.
 
const interned_stringget_qualified_parent_name () const
 Return a copy of the qualified name of the parent of the current decl.
 
scope_declget_scope () const
 Return the type containing the current decl, if any.
 
virtual const interned_stringget_scoped_name () const
 Return the scoped name of the decl.
 
visibility get_visibility () const
 Getter for the visibility of the decl.
 
virtual bool operator!= (const decl_base &) const
 Inequality operator.
 
void set_definition_of_declaration (const decl_base_sptr &)
 Set the definition of this declaration-only decl_base.
 
void set_earlier_declaration (const decl_base_sptr &)
 set the earlier declaration of this decl_base definition.
 
void set_is_anonymous (bool)
 Set the "is_anonymous" flag of the current declaration.
 
void set_is_declaration_only (bool f)
 Set a flag saying if the enum_type_decl is a declaration-only enum_type_decl.
 
void set_is_in_public_symbol_table (bool)
 Set the flag saying if this decl is from a symbol that is in a public symbols table, defined as public (global or weak).
 
virtual void set_linkage_name (const string &m)
 Setter for the linkage name.
 
void set_location (const location &l)
 Set the location for a given declaration.
 
virtual void set_name (const string &n)
 Setter for the name of the decl.
 
void set_naming_typedef (const typedef_decl_sptr &)
 Set the naming typedef of the current instance of decl_base.
 
virtual void set_scope (scope_decl *)
 Setter of the scope of the current decl.
 
void set_visibility (visibility v)
 Setter for the visibility of the decl.
 
- Public Member Functions inherited from type_or_decl_base
 type_or_decl_base (const environment &, enum type_or_decl_kind k=ABSTRACT_TYPE_OR_DECL)
 Constructor of type_or_decl_base.
 
virtual ~type_or_decl_base ()
 The destructor of the type_or_decl_base type.
 
locationget_artificial_location () const
 Getter of the artificial location of the artifact.
 
corpusget_corpus ()
 Get the corpus this ABI artifact belongs to.
 
const corpusget_corpus () const
 Get the corpus this ABI artifact belongs to.
 
const environmentget_environment () const
 Getter of the environment of the current ABI artifact.
 
bool get_is_artificial () const
 Getter of the flag that says if the artefact is artificial.
 
translation_unitget_translation_unit ()
 Get the translation_unit this ABI artifact belongs to.
 
const translation_unitget_translation_unit () const
 Get the translation_unit this ABI artifact belongs to.
 
bool has_artificial_location () const
 Test if the current ABI artifact carries an artificial location.
 
enum type_or_decl_kind kind () const
 Getter for the "kind" property of type_or_decl_base type.
 
void set_artificial_location (const location &)
 Setter of the artificial location of the artificat.
 
void set_is_artificial (bool)
 Setter of the flag that says if the artefact is artificial.
 
void set_translation_unit (translation_unit *)
 Set the translation_unit this ABI artifact belongs to.
 
- Public Member Functions inherited from ir_traversable_base
- Public Member Functions inherited from traversable_base
virtual ~traversable_base ()
 Destructor of the traversable_base type.
 
- Public Member Functions inherited from scope_decl
 scope_decl (const environment &env, const string &name, const location &locus, visibility vis=VISIBILITY_DEFAULT)
 Constructor of the scope_decl type.
 
 scope_decl (const environment &env, location &l)
 Constructor of the scope_decl type.
 
void add_member_type (type_base_sptr t)
 Add a member type to the current instance of class_or_union.
 
type_base_sptr add_member_type (type_base_sptr t, access_specifier a)
 Add a member type to the current instance of class_or_union.
 
bool find_iterator_for_member (const decl_base *, declarations::iterator &)
 Find a member of the current scope and return an iterator on it.
 
bool find_iterator_for_member (const decl_base_sptr, declarations::iterator &)
 Find a member of the current scope and return an iterator on it.
 
type_base_sptr find_member_type (const string &name) const
 Find a member type of a given name, inside the current scope_decl.
 
canonical_type_sptr_set_typeget_canonical_types ()
 @eturn the set of canonical types of the the current scope.
 
const canonical_type_sptr_set_typeget_canonical_types () const
 @eturn the set of canonical types of the the current scope.
 
declarationsget_member_decls ()
 Getter for the member declarations carried by the current scope_decl.
 
const declarationsget_member_decls () const
 Getter for the member declarations carried by the current scope_decl.
 
scopesget_member_scopes ()
 Getter for the scopes carried by the current scope.
 
const scopesget_member_scopes () const
 Getter for the scopes carried by the current scope.
 
const type_base_sptrs_typeget_member_types () const
 Get the member types of this scope_decl.
 
virtual size_t get_num_anonymous_member_classes () const
 Getter for the number of anonymous classes contained in this scope.
 
virtual size_t get_num_anonymous_member_enums () const
 Getter for the number of anonymous enums contained in this scope.
 
virtual size_t get_num_anonymous_member_unions () const
 Getter for the number of anonymous unions contained in this scope.
 
const type_base_sptrs_typeget_sorted_canonical_types () const
 Return a vector of sorted canonical types of the current scope.
 
const declarationsget_sorted_member_decls () const
 Getter for the sorted member declarations carried by the current scope_decl.
 
const type_base_sptrs_typeget_sorted_member_types () const
 Get the sorted member types of this scope_decl.
 
void insert_member_type (type_base_sptr t, declarations::iterator before)
 Insert a member type.
 
bool is_empty () const
 Test if the current scope is empty.
 
void remove_member_type (type_base_sptr t)
 Remove a member type from the current class_or_union scope.
 

Additional Inherited Members

- Public Types inherited from decl_base
enum  binding { BINDING_NONE , BINDING_LOCAL , BINDING_GLOBAL , BINDING_WEAK }
 ELF binding. More...
 
enum  visibility {
  VISIBILITY_NONE , VISIBILITY_DEFAULT , VISIBILITY_PROTECTED , VISIBILITY_HIDDEN ,
  VISIBILITY_INTERNAL
}
 ELF visibility. More...
 
- Public Types inherited from type_or_decl_base
enum  type_or_decl_kind {
  ABSTRACT_TYPE_OR_DECL , ABSTRACT_DECL_BASE , ABSTRACT_SCOPE_DECL , GLOBAL_SCOPE_DECL ,
  NAMESPACE_DECL , VAR_DECL , FUNCTION_DECL , FUNCTION_PARAMETER_DECL ,
  METHOD_DECL , TEMPLATE_DECL , ABSTRACT_TYPE_BASE , ABSTRACT_SCOPE_TYPE_DECL ,
  BASIC_TYPE , SUBRANGE_TYPE , QUALIFIED_TYPE , POINTER_TYPE ,
  REFERENCE_TYPE , POINTER_TO_MEMBER_TYPE , ARRAY_TYPE , ENUM_TYPE ,
  TYPEDEF_TYPE , CLASS_TYPE , UNION_TYPE , FUNCTION_TYPE ,
  METHOD_TYPE
}
 This is a bitmap type which instance is meant to contain the runtime type of a given ABI artifact. Bits of the identifiers of the type of a given artifact as well as the types it inherits from are to be set to 1. More...
 
- Public Types inherited from scope_decl
typedef std::vector< decl_base_sptr > declarations
 Convenience typedef for a vector of decl_base_sptr.
 
typedef std::vector< function_type_sptrfunction_types
 Convenience typedef for a vector of function_type_sptr.
 
typedef std::vector< scope_decl_sptrscopes
 Convenience typedef for a vector of scope_decl_sptr.
 
- Public Attributes inherited from decl_base
priv * priv_
 
- Public Attributes inherited from type_or_decl_base
std::unique_ptr< privpriv_
 
- Protected Member Functions inherited from decl_base
 decl_base (const decl_base &)
 
void clear_qualified_name ()
 Clear the qualified name of this decl.
 
const interned_stringpeek_qualified_name () const
 Getter for the qualified name.
 
const interned_stringpeek_temporary_qualified_name () const
 Getter of the temporary qualified name of the current declaration.
 
void set_context_rel (context_rel *c)
 
void set_qualified_name (const interned_string &) const
 Setter for the qualified name.
 
void set_temporary_qualified_name (const interned_string &) const
 Setter for the temporary qualified name of the current declaration.
 
- Protected Member Functions inherited from type_or_decl_base
virtual hash_t hash_value () const
 Return the hash value of the current IR node.
 
void kind (enum type_or_decl_kind)
 Setter for the "kind" property of type_or_decl_base type.
 
type_or_decl_baseoperator= (const type_or_decl_base &)
 
void * runtime_type_instance ()
 Getter of the pointer to the runtime type sub-object of the current instance.
 
const void * runtime_type_instance () const
 Getter of the pointer to the runtime type sub-object of the current instance.
 
void runtime_type_instance (void *)
 Setter of the pointer to the runtime type sub-object of the current instance.
 
void set_hash_value (hash_t) const
 
void * type_or_decl_base_pointer ()
 Getter of the pointer to either the type_base sub-object of the current instance if it's a type, or to the decl_base sub-object of the current instance if it's a decl.
 
const void * type_or_decl_base_pointer () const
 Getter of the pointer to either the type_base sub-object of the current instance if it's a type, or to the decl_base sub-object of the current instance if it's a decl.
 
- Protected Member Functions inherited from traversable_base
 traversable_base ()
 Default constructor of the traversable_base type.
 
bool visiting () const
 This should returns false before and after the node has been visiting. During the visiting of the node (and of its children) this should return true.
 
void visiting (bool f)
 The traversing code should be responsible of calling this, not the user code.
 
- Protected Member Functions inherited from scope_decl
virtual decl_base_sptr add_member_decl (const decl_base_sptr &member)
 Add a member decl to this scope. Note that user code should not use this, but rather use add_decl_to_scope.
 
decl_base_sptr insert_member_decl (decl_base_sptr member, declarations::iterator before)
 Insert a member decl to this scope, right before an element pointed to by a given iterator. Note that user code should not use this, but rather use insert_decl_into_scope.
 
virtual void remove_member_decl (decl_base_sptr member)
 Remove a declaration from the current scope.
 

Detailed Description

Abstract a class template.

Definition at line 3748 of file abg-ir.h.

Constructor & Destructor Documentation

◆ class_tdecl() [1/2]

class_tdecl ( const environment & env,
const location & locus,
visibility vis = VISIBILITY_DEFAULT )

Constructor for the class_tdecl type.

Parameters
envthe environment we are operating from.
locusthe location of the declaration of the class_tdecl type.
visthe visibility of the instance of class instantiated from this template.

Definition at line 27671 of file abg-ir.cc.

◆ class_tdecl() [2/2]

class_tdecl ( class_decl_sptr pattern,
const location & locus,
visibility vis = VISIBILITY_DEFAULT )

Constructor for the class_tdecl type.

Parameters
patternThe details of the class template. This must NOT be a null pointer. If you really this to be null, please use the constructor above instead.
locusthe source location of the declaration of the type.
visthe visibility of the instances of class instantiated from this template.

Definition at line 27696 of file abg-ir.cc.

◆ ~class_tdecl()

~class_tdecl ( )
virtual

Definition at line 27791 of file abg-ir.cc.

Member Function Documentation

◆ get_pattern()

class_decl_sptr get_pattern ( ) const

Getter of the pattern of the template.

Returns
p the new template.

Definition at line 27727 of file abg-ir.cc.

◆ operator==() [1/3]

bool operator== ( const class_tdecl & o) const
virtual

Definition at line 27764 of file abg-ir.cc.

◆ operator==() [2/3]

bool operator== ( const decl_base & o) const
virtual

Equality operator.

Parameters
othe other instance to compare against.
Returns
true iff equals the current instance.

Reimplemented from template_decl.

Definition at line 27731 of file abg-ir.cc.

◆ operator==() [3/3]

bool operator== ( const template_decl & o) const
virtual

Equality operator.

Parameters
othe other instance to compare against.
Returns
true iff equals the current instance.

Reimplemented from template_decl.

Definition at line 27752 of file abg-ir.cc.

◆ set_pattern()

void set_pattern ( class_decl_sptr p)

Setter of the pattern of the template.

Parameters
pthe new template.

Definition at line 27716 of file abg-ir.cc.

◆ traverse()

bool traverse ( ir_node_visitor & v)
virtual

This implements the ir_traversable_base::traverse pure virtual function.

Parameters
vthe visitor used on the current instance and on the class pattern of the template.
Returns
true if the entire IR node tree got traversed, false otherwise.

Reimplemented from decl_base.

Definition at line 27776 of file abg-ir.cc.


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