summaryrefslogtreecommitdiff
path: root/TAO/docs/tutorials/Quoter/On_Demand_Activation/Stock_i.cpp
blob: 23a2bb46f120f3f1bb26aaa551c502b9f428819b (plain)
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
//
// $Id$
//

#include "Stock_i.h"

Quoter_Stock_i::Quoter_Stock_i (const char *symbol,
                                const char *full_name,
                                CORBA::Double price)
  :  symbol_ (symbol),
     full_name_ (full_name),
     price_ (price)
{
}

char *
Quoter_Stock_i::symbol ()
{
  return CORBA::string_dup (this->symbol_.c_str ());
}

char *
Quoter_Stock_i::full_name ()
{
  return CORBA::string_dup (this->full_name_.c_str ());
}

CORBA::Double
Quoter_Stock_i::price ()
{
  return this->price_;
}

CORBA::Double
Quoter_Stock_i::get_price_and_names (CORBA::String_out symbol,
                                     CORBA::String_out full_name)
{
  symbol = CORBA::string_dup (this->symbol_.c_str ());
  full_name = CORBA::string_dup (this->full_name_.c_str ());
  
  return this->price_;
}