1 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
2 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
3 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
4 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
5 /*%% $XConsortium: mp_signature.h /main/3 1995/10/23 12:01:36 rswiston $ */
7 * Tool Talk Message Passer (MP) - mp_signature.h
9 * Copyright (c) 1990 by Sun Microsystems, Inc.
11 * Declaration of the _Tt_signature & _Tt_signature_list classes.
14 #ifndef _MP_SIGNATURE_H
15 #define _MP_SIGNATURE_H
16 #include "mp/mp_global.h"
17 #include "mp/mp_arg_utils.h"
18 #include "mp_signature_utils.h"
19 #include "mp/mp_context_utils.h"
20 #include "mp/mp_trace.h"
22 * _Tt_signature is used to represent the signature of a method or
28 class _Tt_signature : public _Tt_object {
31 _Tt_signature(_Tt_signature_ptr sig);
32 virtual ~_Tt_signature();
33 Tt_scope scope() const;
34 const _Tt_arg_list_ptr &args() const;
35 const _Tt_context_list_ptr &contexts() const;
36 Tt_class message_class() const;
37 Tt_category category() const;
38 const _Tt_string & op() const;
40 Tt_disposition reliability() const;
41 const _Tt_string & ptid() const;
43 /* only relevant for otype signatures */
44 const _Tt_string & otid() const;
45 _Tt_string super_otid();
47 void set_scope(Tt_scope scope);
48 void set_args(_Tt_arg_list_ptr &args);
49 void set_message_class(Tt_class mclass);
50 void set_pattern_category(Tt_category kind);
51 void set_op(_Tt_string op);
52 void set_opnum(int opnum);
53 void set_reliability(Tt_disposition r);
54 void set_ptid(_Tt_string ptid);
55 void set_otid(_Tt_string otid);
56 void set_super_otid(_Tt_string otid);
61 const _Tt_arg_list_ptr &args,
62 const _Tt_string &otype,
63 const _Tt_context_list_ptr &contexts,
64 const _Tt_msg_trace *trace,
69 const _Tt_arg_list_ptr &args,
70 const _Tt_context_list_ptr &contexts,
74 void append_arg(_Tt_arg_ptr &arg);
75 void append_context(_Tt_context_ptr &c);
76 void print(const _Tt_ostream &os) const;
77 void pretty_print(const _Tt_ostream &os) const;
78 static void pretty_print_(const _Tt_ostream &os,
79 const _Tt_object *obj);
80 static void pretty_print_(const _Tt_ostream &os,
81 const _Tt_signature_list_ptr &sigs,
83 int skip_sigs_with_otid);
84 bool_t xdr(XDR *xdrs);
85 int operator==(const _Tt_signature &sig) const;
86 int is_same_method(const _Tt_signature &sig) const;
87 int is_ce_equal(_Tt_signature &st);
89 unsigned int timestamp() const
90 { return _timestamp; }
91 void set_timestamp(unsigned int stamp)
92 { _timestamp = stamp; }
93 int xdr_version_required() const;
94 static int xdr_version_required_(
95 const _Tt_signature_list_ptr &sigs);
97 friend class _Tt_typedb;
98 _Tt_string _mangled_args;
100 _Tt_arg_list_ptr _args;
101 _Tt_context_list_ptr _contexts;
102 Tt_class _message_class;
103 Tt_category _pattern_category;
105 Tt_disposition _reliability;
109 _Tt_string _super_otid;
110 unsigned int _timestamp;
114 #endif /* _MP_SIGNATURE_H */