-
Notifications
You must be signed in to change notification settings - Fork 165
/
Copy pathPortfolioGreek.cpp
62 lines (50 loc) · 2.25 KB
/
PortfolioGreek.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/************************************************************************
* Copyright(c) 2018, One Unified. All rights reserved. *
* *
* This file is provided as is WITHOUT ANY WARRANTY *
* without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* This software may not be used nor distributed without proper license *
* agreement. *
* *
* See the file LICENSE.txt for redistribution information. *
************************************************************************/
/*
* File: PortfolioGreek.cpp
* Author: [email protected]
*
* Created on July 31, 2018, 11:16 AM
*/
#include "PortfolioGreek.h"
namespace ou { // One Unified
namespace tf { // TradeFrame
PortfolioGreek::PortfolioGreek( const idPortfolio_t& idPortfolio, const idAccountOwner_t& idAccountOwner, const idPortfolio_t& idOwner, EPortfolioType ePortfolioType_,
currency_t eCurrency, const std::string& sDescription )
: Portfolio( idPortfolio, idAccountOwner, idOwner, ePortfolioType_, eCurrency, sDescription )
{
}
PortfolioGreek::~PortfolioGreek( ) {
}
PortfolioGreek::pPositionGreek_t PortfolioGreek::AddPosition( const std::string& sName, pPositionGreek_t pPositionGreek ) {
Portfolio::AddPosition( sName, pPositionGreek );
return pPositionGreek;
}
void PortfolioGreek::DeletePosition( const std::string& sName, pPositionGreek_t ) {
Portfolio::DeletePosition( sName );
}
void PortfolioGreek::AddSubPortfolio( pPortfolioGreek_t& pPortfolioGreek ) {
pPortfolio_t pPortfolio( std::dynamic_pointer_cast<Portfolio>( pPortfolioGreek ) );
Portfolio::AddSubPortfolio( pPortfolio );
}
void PortfolioGreek::RemoveSubPortfolio( const idPortfolio_t& idPortfolio ) {
Portfolio::RemoveSubPortfolio( idPortfolio );
}
std::ostream& operator<<( std::ostream& os, const PortfolioGreek& portfolio ) {
os
<< (Portfolio) portfolio
;
return os;
}
} // namespace tf
} // namespace ou