0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
clanguml::class_diagram::model::objc_method Class Reference

ObjC class method model. More...

Detailed Description

ObjC class method model.

This includes both interface and protocol methods.

Definition at line 33 of file objc_method.h.

#include <objc_method.h>

Public Member Functions

 objc_method (common::model::access_t access, const std::string &name, const std::string &type)
 Constructor.
 
 ~objc_method () override=default
 
void is_optional (bool io)
 Sets whether the protocol method is optional.
 
bool is_optional () const
 Checks if the protocol method is optional.
 
- Public Member Functions inherited from clanguml::class_diagram::model::class_method_base
 class_method_base (common::model::access_t access, const std::string &name, const std::string &type)
 Constructor.
 
 ~class_method_base () override=default
 
std::string display_name () const
 Method name including template parameters/arguments if any.
 
void set_display_name (const std::string &display_name)
 
bool is_static () const
 Whether the method is static.
 
void is_static (bool is_static)
 Set whether the method is static.
 
const std::vector< method_parameter > & parameters () const
 Get the method parameters.
 
void add_parameter (method_parameter &&parameter)
 Add methods parameter.
 
- Public Member Functions inherited from clanguml::class_diagram::model::class_element
 class_element (common::model::access_t access, std::string name, std::string type)
 
 ~class_element () override=default
 
common::model::access_t access () const
 Get elements access scope.
 
std::string name () const
 Get elements name.
 
void set_name (const std::string &name)
 Set elements name.
 
std::string type () const
 Get elements type as string.
 
void set_type (const std::string &type)
 Set elements type as string.
 
void set_qualified_name (const std::string &qn)
 Set class elements qualified name.
 
std::string qualified_name () const
 get fully qualified name of the class element.
 
- Public Member Functions inherited from clanguml::common::model::decorated_element
virtual ~decorated_element ()=default
 
bool skip () const
 
bool skip_relationship () const
 
std::pair< relationship_t, std::string > get_relationship () const
 
std::string style_spec () const
 
const std::vector< std::shared_ptr< decorators::decorator > > & decorators () const
 
void add_decorators (const std::vector< std::shared_ptr< decorators::decorator > > &decorators)
 
void append (const decorated_element &de)
 
std::optional< comment_tcomment () const
 
void set_comment (const comment_t &c)
 
virtual std::optional< std::string > doxygen_link () const
 
- Public Member Functions inherited from clanguml::common::model::source_location
 source_location ()=default
 
 source_location (std::string f, unsigned int l)
 
const std::string & file () const
 
void set_file (const std::string &file)
 
const std::string & file_relative () const
 
void set_file_relative (const std::string &file)
 
const std::string & translation_unit () const
 
void set_translation_unit (const std::string &translation_unit)
 
unsigned int line () const
 
void set_line (const unsigned line)
 
unsigned int column () const
 
void set_column (const unsigned column)
 
unsigned int location_id () const
 
void set_location_id (unsigned int h)
 

Private Attributes

bool is_optional_ {false}
 

Constructor & Destructor Documentation

◆ objc_method()

clanguml::class_diagram::model::objc_method::objc_method ( common::model::access_t  access,
const std::string &  name,
const std::string &  type 
)

Constructor.

Parameters
accessMethods access scope (e.g. public)
nameMethods name.
typeMethods return type as string.

Definition at line 23 of file objc_method.cc.

◆ ~objc_method()

clanguml::class_diagram::model::objc_method::~objc_method ( )
overridedefault

Member Function Documentation

◆ is_optional() [1/2]

bool clanguml::class_diagram::model::objc_method::is_optional ( ) const

Checks if the protocol method is optional.

Returns
True if the method is optional, false otherwise.

Definition at line 32 of file objc_method.cc.

32{ return is_optional_; }

◆ is_optional() [2/2]

void clanguml::class_diagram::model::objc_method::is_optional ( bool  io)

Sets whether the protocol method is optional.

Parameters
ioA boolean value indicating whether the method is optional.

Definition at line 30 of file objc_method.cc.

30{ is_optional_ = io; }

Member Data Documentation

◆ is_optional_

bool clanguml::class_diagram::model::objc_method::is_optional_ {false}
private

Definition at line 62 of file objc_method.h.


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