Initial import of the CDE 2.1.30 sources from the Open Group.

This commit is contained in:
Peter Howkins
2012-03-10 18:21:40 +00:00
commit 83b6996daa
18978 changed files with 3945623 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
/*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */
/*%% (c) Copyright 1993, 1994 International Business Machines Corp. */
/*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */
/*%% (c) Copyright 1993, 1994 Novell, Inc. */
/*%% $XConsortium: mp_s_pattern.h /main/3 1995/10/23 11:57:50 rswiston $ */
/* -*-C++-*-
*
* @(#)mp_s_pattern.h 1.7 29 Jul 1993
*
* Tool Talk Message Passer (MP) - mp_s_pattern.h
*
* Copyright (c) 1990, 1992 by Sun Microsystems, Inc.
*
* This file implements the server side of the _Tt_pattern object.
*/
#ifndef _MP_S_PATTERN_H
#define _MP_S_PATTERN_H
#include "mp/mp_pattern.h"
#include "mp/mp_arg_utils.h"
#include "mp_ptype_utils.h"
#include "mp_s_pattern_utils.h"
#include "mp_signature_utils.h"
class _Tt_msg_trace;
class _Tt_s_message;
class _Tt_s_pattern : public _Tt_pattern {
public:
_Tt_s_pattern();
_Tt_s_pattern(const _Tt_signature_ptr &sig);
virtual ~_Tt_s_pattern();
int match(
const _Tt_s_message &m,
const _Tt_msg_trace &trace
) const;
Tt_status add_arg(const _Tt_arg_ptr &arg);
Tt_status join_context(const _Tt_msg_context &context);
Tt_status quit_context(const _Tt_msg_context &context);
_Tt_ptype_ptr &generating_ptype(); // ptype it was generated
// by declaring
_Tt_ptype_ptr &generating_ptype(_Tt_ptype_ptr &pt); // set it
int is_from_ptype(); // true if generated by
// declaring a ptype
unsigned int timestamp() const
{ return _timestamp; }
void set_timestamp(unsigned int stamp)
{ _timestamp = stamp; }
protected:
// server-only methods that aid in matching patterns and
// messages.
int match_field(
int val,
const _Tt_int_rec_list_ptr &pvals,
int &tm,
const _Tt_msg_trace &trace,
const char *failure_note
) const;
int match_field(
const _Tt_string &val,
const _Tt_string_list_ptr &pvals,
int &tm,
const _Tt_msg_trace &trace,
const char *failure_note
) const;
int match_scopes(
const _Tt_message &m,
int &tm,
const _Tt_msg_trace &trace
) const;
int match_args(
const _Tt_message &m,
int &tm,
const _Tt_msg_trace &trace
) const;
int match_contexts(
const _Tt_message &m,
int &tm,
const _Tt_msg_trace &trace
) const;
private:
_Tt_ptype_ptr _generating_ptype;
unsigned int _timestamp;
friend class _Tt_mp;
friend class _Tt_message;
};
#include "mp_s_pattern_inlines.h"
#endif /* _MP_S_PATTERN_H */