#include <hps.h>

Public Member Functions | |
size_t | GetCount () const |
HPS::Type | ObjectType () const |
PortfolioControl & | operator= (PortfolioControl &&in_that) |
PortfolioControl & | operator= (PortfolioControl const &in_that) |
bool | Pop () |
bool | Pop (PortfolioKey &out_portfolio) |
PortfolioControl (SegmentKey &in_seg) | |
PortfolioControl (PortfolioControl const &in_that) | |
PortfolioControl (PortfolioControl &&in_that) | |
PortfolioControl & | Push (PortfolioKey const &in_portfolio) |
PortfolioControl & | Set (PortfolioKey const &in_portfolio) |
PortfolioControl & | Set (PortfolioKeyArray const &in_portfolios) |
PortfolioControl & | Set (size_t in_count, PortfolioKey const in_portfolios[]) |
bool | Show (PortfolioKeyArray &out_portfolios) const |
bool | ShowTop (PortfolioKey &out_portfolio) const |
virtual HPS::Type | Type () const |
PortfolioControl & | UnsetEverything () |
PortfolioControl & | UnsetTop () |
~PortfolioControl () | |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::PortfolioControl |
![]() | |
static const HPS::Type | staticType = HPS::Type::Control |
![]() | |
static const HPS::Type | staticType = HPS::Type::None |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
Control (Control &&in_that) | |
Control & | operator= (Control &&in_that) |
Detailed Description
The PortfolioControl class is a smart pointer that is tied to a database object. Controls are used for manipulating settings within the database.
Constructor & Destructor Documentation
|
explicit |
Initializes a control tied to the segment in_seg.
HPS::PortfolioControl::PortfolioControl | ( | PortfolioControl const & | in_that | ) |
Initializes a control tied to the same object as in_that.
HPS::PortfolioControl::PortfolioControl | ( | PortfolioControl && | in_that | ) |
The move constructor creates a PortfolioControl by transferring the underlying impl of the rvalue reference to this StyleControl thereby avoiding a copy and allocation.
- Parameters
-
in_that An rvalue reference to a PortfolioControl to take the impl from.
HPS::PortfolioControl::~PortfolioControl | ( | ) |
Releases a reference to the database object this control is tied to.
Member Function Documentation
size_t HPS::PortfolioControl::GetCount | ( | ) | const |
Returns the number of portfolios in use here.
PortfolioControl& HPS::PortfolioControl::operator= | ( | PortfolioControl && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this PortfolioControl thereby avoiding a copy.
- Parameters
-
in_that An rvalue reference to a PortfolioControl to take the impl from.
- Returns
- A reference to this PortfolioControl.
PortfolioControl& HPS::PortfolioControl::operator= | ( | PortfolioControl const & | in_that | ) |
Share the underlying smart-pointer of the PortfolioControl source.
- Parameters
-
in_that The PortfolioControl source of the assignment.
- Returns
- A reference to this PortfolioControl.
bool HPS::PortfolioControl::Pop | ( | ) |
Removes the top portfolio from the portfolio use stack.
- Returns
- true if a portfolio was present, false otherwise.
bool HPS::PortfolioControl::Pop | ( | PortfolioKey & | out_portfolio | ) |
Removes the top portfolio from the portfolio use stack and gives information about it to the user.
- Parameters
-
out_portfolio The source portfolio.
- Returns
- true if a portfolio was present, false otherwise.
PortfolioControl& HPS::PortfolioControl::Push | ( | PortfolioKey const & | in_portfolio | ) |
Adds a portfolio to the top of the portfolio use stack. Existing portfolios in use are unmodified but portfolios on top take precedence if there are conflicting definitions.
- Parameters
-
in_portfolio The portfolio to push to the top of the portfolio use stack.
- Returns
- A reference to this object.
PortfolioControl& HPS::PortfolioControl::Set | ( | PortfolioKey const & | in_portfolio | ) |
Sets a portfolio as the only portfolio in use, replacing any existing portfolios in use.
- Parameters
-
in_portfolio A portfolio containing definitions that should be imported.
- Returns
- A reference to this object.
PortfolioControl& HPS::PortfolioControl::Set | ( | PortfolioKeyArray const & | in_portfolios | ) |
Sets a collection of portfolios as the only portfolios in use, replacing any existing portfolios in use.
- Parameters
-
in_portfolios An array of source portfolios to be used.
- Returns
- A reference to this object.
PortfolioControl& HPS::PortfolioControl::Set | ( | size_t | in_count, |
PortfolioKey const | in_portfolios[] | ||
) |
Sets a collection of portfolios as the only portfolios in use, replacing any existing portfolios in use.
- Parameters
-
in_count The length of the source array. in_portfolios An array of source portfolios to be used.
- Returns
- A reference to this object.
bool HPS::PortfolioControl::Show | ( | PortfolioKeyArray & | out_portfolios | ) | const |
Shows all portfolios in use on this segment.
- Parameters
-
out_portfolios Keys to all portfolios in use on this segment.
- Returns
- true if any portfolio was present, false otherwise.
bool HPS::PortfolioControl::ShowTop | ( | PortfolioKey & | out_portfolio | ) | const |
Shows the top portfolio on the portfolio use stack.
- Parameters
-
out_portfolio The portfolio on top of the stack.
- Returns
- true if a portfolio was present, false otherwise.
|
inlinevirtual |
This function returns the true type of the underlying object. This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
- Warning
- This function must synchronize the database (by waiting for all pending database operations to complete) in order to know the type status of this object with certainty. Therefore this function can negatively impact performance. You should vigorously avoid using this function in high-traffic or peformance-critical areas of your code.
- Returns
- The true type of the object in question.
Reimplemented from HPS::Control.
PortfolioControl& HPS::PortfolioControl::UnsetEverything | ( | ) |
Removes all portfolios from the portfolio use stack.
- Returns
- A reference to this object.
PortfolioControl& HPS::PortfolioControl::UnsetTop | ( | ) |
Removes the top portfolio from the portfolio use stack.
- Returns
- A reference to this object.
The documentation for this class was generated from the following file:
- include/hps.h