summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_factory.cpp
blob: e0ef83d2f78f1cccbfffe9f95e1e242a37a9b112 (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
#include	"idl.h"
#include	"idl_extern.h"
#include	"be.h"
#include        "be_sunsoft.h"

// constructor
TAO_OutStream_Factory::TAO_OutStream_Factory (void)
  : strm_type_ (TAO_OutStream_Factory::TAO_SUNSOFT)
{
}

// destructor
TAO_OutStream_Factory::~TAO_OutStream_Factory (void)
{
}

// set the type of specialized o/p stream we want
int
TAO_OutStream_Factory::set_stream_type
(TAO_OutStream_Factory::TAO_OutStream_Type t) 
{
  this->strm_type_ = t;
  return 0;
}

// factory method
TAO_OutStream *
TAO_OutStream_Factory::make_outstream (void)
{
  switch (this->strm_type_)
    {
    case TAO_OutStream_Factory::TAO_SUNSOFT:
      return new TAO_SunSoft_OutStream ();
    case TAO_OutStream_Factory::TAO_FLICK:
      return (TAO_OutStream *)0;  // not implemented as yet
    default:
      return (TAO_OutStream *)0;
    }
}