2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
24 /*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
25 /*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
26 /*%% (c) Copyright 1993, 1994 Novell, Inc. */
27 /*%% $XConsortium: mp_signature.h /main/3 1995/10/23 12:01:36 rswiston $ */
29 * Tool Talk Message Passer (MP) - mp_signature.h
31 * Copyright (c) 1990 by Sun Microsystems, Inc.
33 * Declaration of the _Tt_signature & _Tt_signature_list classes.
36 #ifndef _MP_SIGNATURE_H
37 #define _MP_SIGNATURE_H
38 #include "mp/mp_global.h"
39 #include "mp/mp_arg_utils.h"
40 #include "mp_signature_utils.h"
41 #include "mp/mp_context_utils.h"
42 #include "mp/mp_trace.h"
44 * _Tt_signature is used to represent the signature of a method or
50 class _Tt_signature : public _Tt_object {
53 _Tt_signature(_Tt_signature_ptr sig);
54 virtual ~_Tt_signature();
55 Tt_scope scope() const;
56 const _Tt_arg_list_ptr &args() const;
57 const _Tt_context_list_ptr &contexts() const;
58 Tt_class message_class() const;
59 Tt_category category() const;
60 const _Tt_string & op() const;
62 Tt_disposition reliability() const;
63 const _Tt_string & ptid() const;
65 /* only relevant for otype signatures */
66 const _Tt_string & otid() const;
67 _Tt_string super_otid();
69 void set_scope(Tt_scope scope);
70 void set_args(_Tt_arg_list_ptr &args);
71 void set_message_class(Tt_class mclass);
72 void set_pattern_category(Tt_category kind);
73 void set_op(_Tt_string op);
74 void set_opnum(int opnum);
75 void set_reliability(Tt_disposition r);
76 void set_ptid(_Tt_string ptid);
77 void set_otid(_Tt_string otid);
78 void set_super_otid(_Tt_string otid);
83 const _Tt_arg_list_ptr &args,
84 const _Tt_string &otype,
85 const _Tt_context_list_ptr &contexts,
86 const _Tt_msg_trace *trace,
91 const _Tt_arg_list_ptr &args,
92 const _Tt_context_list_ptr &contexts,
96 void append_arg(_Tt_arg_ptr &arg);
97 void append_context(_Tt_context_ptr &c);
98 void print(const _Tt_ostream &os) const;
99 void pretty_print(const _Tt_ostream &os) const;
100 static void pretty_print_(const _Tt_ostream &os,
101 const _Tt_object *obj);
102 static void pretty_print_(const _Tt_ostream &os,
103 const _Tt_signature_list_ptr &sigs,
104 Tt_category category,
105 int skip_sigs_with_otid);
106 bool_t xdr(XDR *xdrs);
107 int operator==(const _Tt_signature &sig) const;
108 int is_same_method(const _Tt_signature &sig) const;
109 int is_ce_equal(_Tt_signature &st);
111 unsigned int timestamp() const
112 { return _timestamp; }
113 void set_timestamp(unsigned int stamp)
114 { _timestamp = stamp; }
115 int xdr_version_required() const;
116 static int xdr_version_required_(
117 const _Tt_signature_list_ptr &sigs);
119 friend class _Tt_typedb;
120 _Tt_string _mangled_args;
122 _Tt_arg_list_ptr _args;
123 _Tt_context_list_ptr _contexts;
124 Tt_class _message_class;
125 Tt_category _pattern_category;
127 Tt_disposition _reliability;
131 _Tt_string _super_otid;
132 unsigned int _timestamp;
136 #endif /* _MP_SIGNATURE_H */