SNode.C
Loading...
Searching...
No Matches
utils::AppWithPtr Class Reference

#include <SubCommand.h>

Inheritance diagram for utils::AppWithPtr:
Collaboration diagram for utils::AppWithPtr:

Public Member Functions

 AppWithPtr (const std::string &description, const std::string &name, SubCommand *t, bool manage)
const SubCommandgetPtr () const
 ~AppWithPtr () override
SubCommandgetPtr ()

Private Attributes

SubCommandptr
bool manage

Detailed Description

Definition at line 81 of file SubCommand.h.

Constructor & Destructor Documentation

◆ AppWithPtr()

utils::AppWithPtr::AppWithPtr ( const std::string & description,
const std::string & name,
SubCommand * t,
bool manage )

Definition at line 451 of file SubCommand.cpp.

452 : CLI::App(description, name)
453 , ptr(t)
454 , manage(manage) {
455 }
SubCommand * ptr
Definition SubCommand.h:92

References manage, and ptr.

◆ ~AppWithPtr()

utils::AppWithPtr::~AppWithPtr ( )
override

Definition at line 457 of file SubCommand.cpp.

457 {
458 if (manage) {
459 delete ptr;
460 }
461 }

References manage, and ptr.

Member Function Documentation

◆ getPtr() [1/2]

SubCommand * utils::AppWithPtr::getPtr ( )

Definition at line 467 of file SubCommand.cpp.

467 {
468 return ptr;
469 }

References ptr.

Referenced by utils::SubCommand::getSubCommand(), and utils::SubCommand::getSubCommand().

Here is the caller graph for this function:

◆ getPtr() [2/2]

const SubCommand * utils::AppWithPtr::getPtr ( ) const

Definition at line 463 of file SubCommand.cpp.

463 {
464 return ptr;
465 }

References ptr.

Member Data Documentation

◆ manage

bool utils::AppWithPtr::manage
private

Definition at line 93 of file SubCommand.h.

Referenced by AppWithPtr(), and ~AppWithPtr().

◆ ptr

SubCommand* utils::AppWithPtr::ptr
private

Definition at line 92 of file SubCommand.h.

Referenced by AppWithPtr(), getPtr(), getPtr(), and ~AppWithPtr().


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