summaryrefslogtreecommitdiff
path: root/TAO/DevGuideExamples/ValueTypes/Messenger/Message_i.h
blob: 704482c22d88f2bd37f4388427e601d622ad9571 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// $Id$

#ifndef MESSAGE_I_H
#define MESSAGE_I_H

#include "MessengerC.h"

#include "tao/Valuetype/ValueFactory.h"

class MessageImpl : public virtual OBV_Message,
                    public virtual CORBA::DefaultValueRefCountBase
{
public:
  MessageImpl();

  MessageImpl(
    const char* address,
    const char* user,
    const char* subject,
    const char* txt
    );

  MessageImpl(
    ::Message::AddrList &address,
    const char* user,
    const char* subject,
    const char* txt
    );

  virtual ::CORBA::ValueBase *_copy_value (void);

  virtual ::Message::AddrList* getAddresses();
  virtual void addAddress(const char*);

  virtual char* user();
  virtual void user(const char*);

  virtual char* subject();
  virtual void subject(const char*);

  virtual char* text();
  virtual void text(const char*);

  virtual void print();

protected:
  virtual ~MessageImpl();
};

class MessageFactory
  : public virtual CORBA::ValueFactoryBase
{
public:
  static void register_new_factory(CORBA::ORB& orb);

private:
  virtual CORBA::ValueBase* create_for_unmarshal();
};

#endif