9#ifndef FIMS_INTERFACE_RCPP_RCPP_OBJECTS_SHARED_PRIMITIVE_HPP
10#define FIMS_INTERFACE_RCPP_RCPP_OBJECTS_SHARED_PRIMITIVE_HPP
31 std::shared_ptr<int> value;
114 if (
this != &
other) {
115 value = std::move(
other.value);
127 int get()
const {
return *value; }
375 *value += *
other.value;
389 *value -= *
other.value;
404 *value *= *
other.value;
418 *value /= *
other.value;
497 return *value == *
other.value;
510 return *value != *
other.value;
536 return *value <= *
other.value;
562 return *value >= *
other.value;
746 return (
lhs <=
rhs.get());
776 return (
lhs >=
rhs.get());
791 std::shared_ptr<int> value;
834 if (
this != &
other) {
880 if (
this != &
other) {
881 value = std::move(
other.value);
895 int get()
const {
return *value; }
1151 *value += *
other.value;
1166 *value -= *
other.value;
1181 *value *= *
other.value;
1196 *value /= *
other.value;
1277 return *value == *
other.value;
1291 return *value != *
other.value;
1305 return *value < *
other.value;
1319 return *value <= *
other.value;
1333 return *value > *
other.value;
1347 return *value >= *
other.value;
1515 std::shared_ptr<std::string> value;
1558 if (
this != &
other) {
1559 value =
other.value;
1602 if (
this != &
other) {
1603 value = std::move(
other.value);
1617 std::string
get()
const {
return *value; }
1637 operator std::string() {
return this->
get(); }
1706 std::shared_ptr<bool> value;
1749 if (
this != &
other) {
1750 value =
other.value;
1781 : value(std::move(
other.value)) {}
1794 if (
this != &
other) {
1795 value = std::move(
other.value);
1809 bool get()
const {
return *value; }
1879 return *value == *
other.value;
1893 return *value != *
other.value;
1907 return *value < *
other.value;
1921 return *value <= *
other.value;
1935 return *value > *
other.value;
1949 return *value >= *
other.value;
2052 return (
lhs <
rhs.get());
2067 return (
lhs <=
rhs.get());
2082 return (
lhs >
rhs.get());
2097 return (
lhs >=
rhs.get());
A class that provides shared ownership of a boolean value.
Definition rcpp_shared_primitive.hpp:1704
SharedBoolean(SharedBoolean &&other) noexcept
Constructs a new SharedBoolean object by moving resources.
Definition rcpp_shared_primitive.hpp:1780
bool operator!=(const bool &other) const
Overloads the inequality operator (!=) for a boolean value.
Definition rcpp_shared_primitive.hpp:1972
SharedBoolean(bool val)
Constructs a new SharedBoolean object from a boolean value.
Definition rcpp_shared_primitive.hpp:1725
bool operator>=(const bool &other) const
Overloads the greater-than-or-equal-to operator (>=) for a boolean.
Definition rcpp_shared_primitive.hpp:2021
bool operator<(const bool &other) const
Overloads the less-than operator (<) for a boolean value.
Definition rcpp_shared_primitive.hpp:1984
bool operator<(const SharedBoolean &other) const
Overloads the less-than operator (<).
Definition rcpp_shared_primitive.hpp:1906
SharedBoolean(const SharedBoolean &other)
Copy constructs a new SharedBoolean object.
Definition rcpp_shared_primitive.hpp:1735
SharedBoolean & operator=(const bool &other)
Overloaded assignment operator for a boolean value.
Definition rcpp_shared_primitive.hpp:1765
const bool * operator->() const
Overloads the member access operator (->) for const objects.
Definition rcpp_shared_primitive.hpp:1866
bool operator>=(const SharedBoolean &other) const
Overloads the greater-than-or-equal-to operator (>=).
Definition rcpp_shared_primitive.hpp:1948
SharedBoolean & operator=(const SharedBoolean &other)
Overloaded copy assignment operator.
Definition rcpp_shared_primitive.hpp:1748
bool operator!=(const SharedBoolean &other) const
Overloads the inequality operator (!=).
Definition rcpp_shared_primitive.hpp:1892
bool operator==(const SharedBoolean &other) const
Overloads the equality operator (==).
Definition rcpp_shared_primitive.hpp:1878
void set(bool val)
Sets the boolean value of the object.
Definition rcpp_shared_primitive.hpp:1818
bool operator>(const SharedBoolean &other) const
Overloads the greater-than operator (>).
Definition rcpp_shared_primitive.hpp:1934
bool operator==(const bool &other) const
Overloads the equality operator (==) for a boolean value.
Definition rcpp_shared_primitive.hpp:1961
bool * operator->()
Overloads the member access operator (->).
Definition rcpp_shared_primitive.hpp:1852
SharedBoolean & operator=(SharedBoolean &&other) noexcept
Overloaded move assignment operator.
Definition rcpp_shared_primitive.hpp:1793
bool operator<=(const bool &other) const
Overloads the less-than-or-equal-to operator (<=) for a boolean.
Definition rcpp_shared_primitive.hpp:1996
bool get() const
Retrieves the boolean value managed by the object.
Definition rcpp_shared_primitive.hpp:1809
friend std::ostream & operator<<(std::ostream &os, const SharedBoolean &sp)
Overloads the stream insertion operator (<<) for SharedBoolean.
Definition rcpp_shared_primitive.hpp:2034
bool operator<=(const SharedBoolean &other) const
Overloads the less-than-or-equal-to operator (<=).
Definition rcpp_shared_primitive.hpp:1920
SharedBoolean()
Constructs a new SharedBoolean object with a default value.
Definition rcpp_shared_primitive.hpp:1715
bool operator>(const bool &other) const
Overloads the greater-than operator (>) for a boolean value.
Definition rcpp_shared_primitive.hpp:2008
bool operator*() const
Overloads the dereference operator (*).
Definition rcpp_shared_primitive.hpp:1840
A class that provides shared ownership of an integer value.
Definition rcpp_shared_primitive.hpp:29
SharedInt operator/(const SharedInt &other) const
Overloads the binary division operator (/).
Definition rcpp_shared_primitive.hpp:301
void set(int val)
Change the value of the integer.
Definition rcpp_shared_primitive.hpp:134
int * operator->()
Overloads the member access operator (->).
Definition rcpp_shared_primitive.hpp:170
SharedInt()
Construct a new SharedInt object.
Definition rcpp_shared_primitive.hpp:38
SharedInt & operator--()
Overloads the prefix decrement operator (--).
Definition rcpp_shared_primitive.hpp:225
bool operator!=(const SharedInt &other) const
Overloads the inequality operator (!=).
Definition rcpp_shared_primitive.hpp:509
SharedInt operator*(const SharedInt &other) const
Overloads the binary multiplication operator (*).
Definition rcpp_shared_primitive.hpp:287
SharedInt & operator++()
Overloads the prefix increment operator (++).
Definition rcpp_shared_primitive.hpp:195
SharedInt & operator*=(const int &other)
Overloads the compound assignment operator (*=) for a shared integer value.
Definition rcpp_shared_primitive.hpp:465
SharedInt & operator*=(const SharedInt &other)
Overloads the compound assignment operator (*=).
Definition rcpp_shared_primitive.hpp:403
bool operator!=(const int &other) const
Overloads the inequality operator (!=) for an integer value.
Definition rcpp_shared_primitive.hpp:587
int operator*() const
Overloads the dereference operator.
Definition rcpp_shared_primitive.hpp:158
SharedInt & operator/=(const int &other)
Overloads the compound assignment operator (/=) for a shared integer value.
Definition rcpp_shared_primitive.hpp:480
SharedInt operator++(int)
Overloads the postfix increment operator (++).
Definition rcpp_shared_primitive.hpp:210
bool operator>(const SharedInt &other) const
Overloads the greater-than operator (>).
Definition rcpp_shared_primitive.hpp:549
const int * operator->() const
Overloads the member access operator (->) for const objects.
Definition rcpp_shared_primitive.hpp:182
SharedInt operator+(const SharedInt &other) const
Overloads the binary addition operator (+).
Definition rcpp_shared_primitive.hpp:258
SharedInt & operator=(SharedInt &&other) noexcept
Overloaded move assignment operator.
Definition rcpp_shared_primitive.hpp:113
SharedInt operator/(const int &other) const
Overloads the binary division operator for an integer value.
Definition rcpp_shared_primitive.hpp:359
SharedInt & operator-=(const SharedInt &other)
Overloads the compound assignment operator (-=).
Definition rcpp_shared_primitive.hpp:388
SharedInt & operator=(const SharedInt &other)
Overloaded assignment operator for copying a SharedInt object.
Definition rcpp_shared_primitive.hpp:70
SharedInt & operator-=(const int &other)
Overloads the compound assignment operator (-=) for a shared integer value.
Definition rcpp_shared_primitive.hpp:449
SharedInt & operator=(const int &other)
Overloaded assignment operator for an integer value.
Definition rcpp_shared_primitive.hpp:86
SharedInt operator*(const int &other) const
Overloads the binary multiplication operator for an integer value.
Definition rcpp_shared_primitive.hpp:345
bool operator>=(const int &other) const
Overloads the greater-than-or-equal-to operator (>=) for an integer value.
Definition rcpp_shared_primitive.hpp:637
SharedInt & operator+=(const SharedInt &other)
Overloads the compound assignment operator (+=).
Definition rcpp_shared_primitive.hpp:374
SharedInt operator--(int)
Overloads the postfix decrement operator.
Definition rcpp_shared_primitive.hpp:240
SharedInt(int val)
Constructs a new SharedInt object.
Definition rcpp_shared_primitive.hpp:48
bool operator==(const SharedInt &other) const
Overloads the equality operator (==).
Definition rcpp_shared_primitive.hpp:496
bool operator<=(const SharedInt &other) const
Overloads the less-than-or-equal-to operator (<=).
Definition rcpp_shared_primitive.hpp:535
SharedInt(SharedInt &&other) noexcept
Constructs a new SharedInt object by moving resources.
Definition rcpp_shared_primitive.hpp:101
SharedInt operator+(const int &other) const
Overloads the binary addition operator for an integer value.
Definition rcpp_shared_primitive.hpp:317
bool operator<=(const int &other) const
Overloads the less-than-or-equal-to operator (<=) for an integer value.
Definition rcpp_shared_primitive.hpp:612
SharedInt operator-(const SharedInt &other) const
Overloads the binary subtraction operator (-).
Definition rcpp_shared_primitive.hpp:273
SharedInt & operator+=(const int &other)
Overloads the compound assignment operator (+=) for a shared integer value.
Definition rcpp_shared_primitive.hpp:434
bool operator>(const int &other) const
Overloads the greater-than operator (>) for an integer value.
Definition rcpp_shared_primitive.hpp:624
bool operator<(const SharedInt &other) const
Overloads the less-than operator (<).
Definition rcpp_shared_primitive.hpp:523
SharedInt operator-(const int &other) const
Overloads the binary subtraction operator for an integer value.
Definition rcpp_shared_primitive.hpp:331
friend std::ostream & operator<<(std::ostream &os, const SharedInt &sp)
Overloads the stream insertion operator (<<) for SharedInt.
Definition rcpp_shared_primitive.hpp:649
bool operator==(const int &other) const
Overloads the equality operator (==) for an integer value.
Definition rcpp_shared_primitive.hpp:576
bool operator>=(const SharedInt &other) const
Overloads the greater-than-or-equal-to operator (>=).
Definition rcpp_shared_primitive.hpp:561
bool operator<(const int &other) const
Overloads the less-than operator (<) for an integer value.
Definition rcpp_shared_primitive.hpp:599
SharedInt(const SharedInt &other)
Copy constructs a new SharedInt object.
Definition rcpp_shared_primitive.hpp:58
int get() const
Retrieve the value of the integer.
Definition rcpp_shared_primitive.hpp:127
SharedInt & operator/=(const SharedInt &other)
Overloads the compound assignment operator (/=).
Definition rcpp_shared_primitive.hpp:417
A class that provides shared ownership of an integer value.
Definition rcpp_shared_primitive.hpp:789
SharedReal & operator=(const int &other)
Overloaded assignment operator for an integer value.
Definition rcpp_shared_primitive.hpp:850
SharedReal operator+(const SharedReal &other) const
Overloads the binary addition operator (+).
Definition rcpp_shared_primitive.hpp:1029
bool operator>=(const SharedReal &other) const
Overloads the greater-than-or-equal-to operator (>=).
Definition rcpp_shared_primitive.hpp:1346
bool operator>=(const int &other) const
Overloads the greater-than-or-equal-to operator (>=) for an integer.
Definition rcpp_shared_primitive.hpp:1422
SharedReal & operator+=(const int &other)
Overloads the compound assignment operator (+=) for an integer.
Definition rcpp_shared_primitive.hpp:1211
void set(int val)
Sets the integer value of the object.
Definition rcpp_shared_primitive.hpp:904
int * operator->()
Overloads the member access operator (->).
Definition rcpp_shared_primitive.hpp:940
SharedReal & operator/=(const int &other)
Overloads the compound assignment operator (/=) for an integer.
Definition rcpp_shared_primitive.hpp:1259
SharedReal & operator*=(const SharedReal &other)
Overloads the compound assignment operator (*=).
Definition rcpp_shared_primitive.hpp:1180
bool operator==(const int &other) const
Overloads the equality operator (==) for an integer value.
Definition rcpp_shared_primitive.hpp:1361
SharedReal & operator*=(const int &other)
Overloads the compound assignment operator (*=) for an integer.
Definition rcpp_shared_primitive.hpp:1243
SharedReal operator*(const int &other) const
Overloads the binary multiplication operator (*) for an integer.
Definition rcpp_shared_primitive.hpp:1120
SharedReal operator-(const SharedReal &other) const
Overloads the binary subtraction operator (-).
Definition rcpp_shared_primitive.hpp:1045
bool operator!=(const SharedReal &other) const
Overloads the inequality operator (!=).
Definition rcpp_shared_primitive.hpp:1290
bool operator<=(const SharedReal &other) const
Overloads the less-than-or-equal-to operator (<=).
Definition rcpp_shared_primitive.hpp:1318
SharedReal operator++(int)
Overloads the postfix increment operator.
Definition rcpp_shared_primitive.hpp:980
SharedReal & operator=(SharedReal &&other) noexcept
Overloaded move assignment operator.
Definition rcpp_shared_primitive.hpp:879
SharedReal & operator-=(const SharedReal &other)
Overloads the compound assignment operator (-=).
Definition rcpp_shared_primitive.hpp:1165
const int * operator->() const
Overloads the member access operator (->) for const objects.
Definition rcpp_shared_primitive.hpp:952
SharedReal & operator+=(const SharedReal &other)
Overloads the compound assignment operator (+=).
Definition rcpp_shared_primitive.hpp:1150
bool operator>(const SharedReal &other) const
Overloads the greater-than operator (>).
Definition rcpp_shared_primitive.hpp:1332
int operator*() const
Overloads the dereference operator (*).
Definition rcpp_shared_primitive.hpp:928
SharedReal operator-(const int &other) const
Overloads the binary subtraction operator (-) for an integer.
Definition rcpp_shared_primitive.hpp:1105
SharedReal & operator--()
Overloads the prefix decrement operator (--).
Definition rcpp_shared_primitive.hpp:996
SharedReal operator/(const SharedReal &other) const
Overloads the binary division operator (/).
Definition rcpp_shared_primitive.hpp:1075
SharedReal()
Constructs a new SharedReal object with a default value.
Definition rcpp_shared_primitive.hpp:800
SharedReal & operator/=(const SharedReal &other)
Overloads the compound assignment operator (/=).
Definition rcpp_shared_primitive.hpp:1195
friend std::ostream & operator<<(std::ostream &os, const SharedReal &sp)
Overloads the stream insertion operator (<<) for SharedReal.
Definition rcpp_shared_primitive.hpp:1434
SharedReal & operator-=(const int &other)
Overloads the compound assignment operator (-=) for an integer.
Definition rcpp_shared_primitive.hpp:1227
SharedReal operator*(const SharedReal &other) const
Overloads the binary multiplication operator (*).
Definition rcpp_shared_primitive.hpp:1060
SharedReal operator/(const int &other) const
Overloads the binary division operator (/) for an integer.
Definition rcpp_shared_primitive.hpp:1134
SharedReal & operator++()
Overloads the prefix increment operator (++).
Definition rcpp_shared_primitive.hpp:965
SharedReal & operator=(const SharedReal &other)
Overloaded copy assignment operator.
Definition rcpp_shared_primitive.hpp:833
bool operator!=(const int &other) const
Overloads the inequality operator (!=) for an integer.
Definition rcpp_shared_primitive.hpp:1372
int get() const
Retrieves the integer value managed by the object.
Definition rcpp_shared_primitive.hpp:895
SharedReal(SharedReal &&other) noexcept
Constructs a new SharedReal object by moving resources.
Definition rcpp_shared_primitive.hpp:866
SharedReal(const SharedReal &other)
Copy constructs a new SharedReal object.
Definition rcpp_shared_primitive.hpp:820
bool operator>(const int &other) const
Overloads the greater-than operator (>) for an integer.
Definition rcpp_shared_primitive.hpp:1409
bool operator<=(const int &other) const
Overloads the less-than-or-equal-to operator (<=) for an integer.
Definition rcpp_shared_primitive.hpp:1397
bool operator<(const int &other) const
Overloads the less-than operator (<) for an integer.
Definition rcpp_shared_primitive.hpp:1384
SharedReal operator--(int)
Overloads the postfix decrement operator.
Definition rcpp_shared_primitive.hpp:1011
bool operator==(const SharedReal &other) const
Overloads the equality operator (==).
Definition rcpp_shared_primitive.hpp:1276
SharedReal(int val)
Constructs a new SharedReal object from an integer value.
Definition rcpp_shared_primitive.hpp:810
SharedReal operator+(const int &other) const
Overloads the binary addition operator (+) for an integer.
Definition rcpp_shared_primitive.hpp:1091
bool operator<(const SharedReal &other) const
Overloads the less-than operator (<).
Definition rcpp_shared_primitive.hpp:1304
A class that provides shared ownership of a string.
Definition rcpp_shared_primitive.hpp:1513
operator std::string()
User-defined conversion to std::string.
Definition rcpp_shared_primitive.hpp:1637
const std::string * operator->() const
Overloads the member access operator (->) for const objects.
Definition rcpp_shared_primitive.hpp:1674
SharedString & operator=(SharedString &&other) noexcept
Overloaded move assignment operator.
Definition rcpp_shared_primitive.hpp:1601
SharedString(SharedString &&other) noexcept
Constructs a new SharedString object by moving resources.
Definition rcpp_shared_primitive.hpp:1589
std::string get() const
Retrieves the string value managed by the object.
Definition rcpp_shared_primitive.hpp:1617
std::string * operator->()
Overloads the member access operator (->).
Definition rcpp_shared_primitive.hpp:1660
SharedString(const SharedString &other)
Copy constructs a new SharedString object.
Definition rcpp_shared_primitive.hpp:1544
SharedString(std::string val)
Constructs a new SharedString object from a string value.
Definition rcpp_shared_primitive.hpp:1534
friend std::ostream & operator<<(std::ostream &os, const SharedString &sp)
Overloads the stream insertion operator (<<) for SharedString.
Definition rcpp_shared_primitive.hpp:1688
SharedString & operator=(const SharedString &other)
Overloaded copy assignment operator.
Definition rcpp_shared_primitive.hpp:1557
void set(std::string val)
Sets the string value of the object.
Definition rcpp_shared_primitive.hpp:1626
SharedString & operator=(const std::string &other)
Overloaded assignment operator for a string value.
Definition rcpp_shared_primitive.hpp:1574
std::string operator*() const
Overloads the dereference operator (*).
Definition rcpp_shared_primitive.hpp:1648
SharedString()
Constructs a new SharedString object with a default, empty value.
Definition rcpp_shared_primitive.hpp:1524
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:235
SharedInt operator-(const int &lhs, const SharedInt &rhs)
Overloads the binary subtraction operator (-) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:685
SharedReal fims_double
An alias for the SharedReal class.
Definition rcpp_shared_primitive.hpp:2115
SharedBoolean fims_bool
An alias for the SharedBoolean class.
Definition rcpp_shared_primitive.hpp:2131
SharedInt operator+(const int &lhs, const SharedInt &rhs)
Overloads the binary addition operator (+) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:669
bool operator>(const int &lhs, const SharedInt &rhs)
Overloads the greater-than operator (>) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:760
SharedInt fims_int
An alias for the SharedInt class.
Definition rcpp_shared_primitive.hpp:2107
bool operator>=(const int &lhs, const SharedInt &rhs)
Overloads the greater-than-or-equal-to operator (>=) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:775
SharedInt operator/(const int &lhs, const SharedInt &rhs)
Overloads the binary division operator (/) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:715
SharedInt operator*(const int &lhs, const SharedInt &rhs)
Overloads the binary multiplication operator (*) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:700
bool operator<(const int &lhs, const SharedInt &rhs)
Overloads the less-than operator (<) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:730
bool operator<=(const int &lhs, const SharedInt &rhs)
Overloads the less-than-or-equal-to operator (<=) for an integer left-hand side operand.
Definition rcpp_shared_primitive.hpp:745
SharedString fims_string
An alias for the SharedString class.
Definition rcpp_shared_primitive.hpp:2123