LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::objc::Class Class Reference

This class represents an Objective-C class (@interface). More...

#include <Class.hpp>

Classes

class  Iterator

Public Types

using methods_t = iterator_range<Method::Iterator>
 Iterator for the class's methods.
using protocols_t = iterator_range<Protocol::Iterator>
 Iterator for the protocols implemented by this class.
using properties_t = iterator_range<Property::Iterator>
 Iterator for the properties declared by this class.
using ivars_t = iterator_range<IVar::Iterator>
 Iterator for the instance variables defined by this class.

Public Member Functions

 Class (std::unique_ptr< details::Class > impl)
std::string name () const
 Name of the class.
std::string demangled_name () const
 Demangled name of the class.
std::unique_ptr< Classsuper_class () const
 Parent class in case of inheritance.
std::string super_name () const
 (raw) name of the superclass (empty for root classes or when it could not be resolved).
std::string demangled_super_name () const
 Demangled name of the superclass.
bool is_meta () const
methods_t methods () const
 Iterator over the different methods defined by this class.
protocols_t protocols () const
 Iterator over the different protocols implemented by this class.
properties_t properties () const
 Iterator over the properties of this class.
ivars_t ivars () const
 Iterator over the different instance variables defined in this class.
std::string to_decl (const DeclOpt &opt=DeclOpt()) const
 Generate a header-like string for this specific class.
 ~Class ()

Detailed Description

This class represents an Objective-C class (@interface).

Member Typedef Documentation

◆ ivars_t

Iterator for the instance variables defined by this class.

◆ methods_t

◆ properties_t

Iterator for the properties declared by this class.

◆ protocols_t

Iterator for the protocols implemented by this class.

Constructor & Destructor Documentation

◆ Class()

LIEF::objc::Class::Class ( std::unique_ptr< details::Class > impl)

◆ ~Class()

LIEF::objc::Class::~Class ( )

References Class().

Member Function Documentation

◆ demangled_name()

std::string LIEF::objc::Class::demangled_name ( ) const

Demangled name of the class.

◆ demangled_super_name()

std::string LIEF::objc::Class::demangled_super_name ( ) const

Demangled name of the superclass.

References demangled_super_name().

Referenced by demangled_super_name().

◆ is_meta()

bool LIEF::objc::Class::is_meta ( ) const

References is_meta().

Referenced by is_meta().

◆ ivars()

ivars_t LIEF::objc::Class::ivars ( ) const

Iterator over the different instance variables defined in this class.

References ivars(), and LIEF_LIFETIMEBOUND.

Referenced by ivars().

◆ methods()

methods_t LIEF::objc::Class::methods ( ) const

Iterator over the different methods defined by this class.

References LIEF_LIFETIMEBOUND, and methods().

Referenced by methods().

◆ name()

std::string LIEF::objc::Class::name ( ) const

Name of the class.

◆ properties()

properties_t LIEF::objc::Class::properties ( ) const

Iterator over the properties of this class.

References LIEF_LIFETIMEBOUND, and properties().

Referenced by properties().

◆ protocols()

protocols_t LIEF::objc::Class::protocols ( ) const

Iterator over the different protocols implemented by this class.

References LIEF_LIFETIMEBOUND, and protocols().

Referenced by protocols().

◆ super_class()

std::unique_ptr< Class > LIEF::objc::Class::super_class ( ) const

Parent class in case of inheritance.

This returns the superclass object only when it is defined in the same binary. For root classes (e.g. NSObject) or superclasses imported from another image, it returns a null pointer even though the name can still be resolved through super_name() / demangled_super_name().

References LIEF_LIFETIMEBOUND.

◆ super_name()

std::string LIEF::objc::Class::super_name ( ) const

(raw) name of the superclass (empty for root classes or when it could not be resolved).

References super_name().

Referenced by super_name().

◆ to_decl()

std::string LIEF::objc::Class::to_decl ( const DeclOpt & opt = DeclOpt()) const

Generate a header-like string for this specific class.

The generated output can be configured with DeclOpt

References to_decl().

Referenced by to_decl().


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