Skip to content
API Documentation
BastionGuard™
anonymous_namespace{bastionguard-firewall.cpp}::SecureInput Struct Reference

Public Member Functions

 SecureInput ()=default
 SecureInput (int input_fd, std::string input_path)
 SecureInput (const SecureInput &)=delete
SecureInput & operator= (const SecureInput &)=delete
 SecureInput (SecureInput &&other) noexcept
SecureInput & operator= (SecureInput &&other) noexcept
 ~SecureInput ()

Public Attributes

int fd {-1}
std::string path

Detailed Description

Definition at line 47 of file bastionguard-firewall.cpp.

Constructor & Destructor Documentation

◆ SecureInput() [1/4]

anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::SecureInput ( )
default

◆ SecureInput() [2/4]

anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::SecureInput ( int input_fd,
std::string input_path )
inline

◆ SecureInput() [3/4]

anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::SecureInput ( const SecureInput & )
delete

References SecureInput().

◆ SecureInput() [4/4]

anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::SecureInput ( SecureInput && other)
inlinenoexcept

Definition at line 58 of file bastionguard-firewall.cpp.

59 : fd(other.fd), path(std::move(other.path)) {
60 other.fd = -1;
61 }

References fd, path, and SecureInput().

◆ ~SecureInput()

anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::~SecureInput ( )
inline

Definition at line 73 of file bastionguard-firewall.cpp.

73 {
74 if (fd >= 0) ::close(fd);
75 }

References fd.

Member Function Documentation

◆ operator=() [1/2]

SecureInput & anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::operator= ( const SecureInput & )
delete

References SecureInput().

◆ operator=() [2/2]

SecureInput & anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::operator= ( SecureInput && other)
inlinenoexcept

Definition at line 63 of file bastionguard-firewall.cpp.

63 {
64 if (this != &other) {
65 if (fd >= 0) ::close(fd);
66 fd = other.fd;
67 path = std::move(other.path);
68 other.fd = -1;
69 }
70 return *this;
71 }

References fd, path, and SecureInput().

Member Data Documentation

◆ fd

int anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::fd {-1}

Definition at line 48 of file bastionguard-firewall.cpp.

Referenced by operator=(), SecureInput(), SecureInput(), and ~SecureInput().

◆ path

std::string anonymous_namespace{bastionguard-firewall.cpp}::SecureInput::path

Definition at line 49 of file bastionguard-firewall.cpp.

Referenced by operator=(), SecureInput(), and SecureInput().


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