UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tr_selector_inline.hpp
1 /* tr_selector_inline.hpp */
2 /* $Id$ */
3 #ifndef __tr_selector_inline_hpp
4 #define __tr_selector_inline_hpp
5 
6 template <typename AttrT>
8  TrHeaderAttrId hdr_attr_id,
9  const AttrT &attr_val):
10  TrSelBaseRule(), m_op(op), m_hdr_attr_id(hdr_attr_id)
11 {
12  m_hdr_attr_vals.push_back(attr_val);
13 }
14 
15 template <typename AttrT>
17  TrHeaderAttrId hdr_attr_id,
18  std::vector<AttrT> &attr_vals):
19  TrSelBaseRule(), m_op(op), m_hdr_attr_id(hdr_attr_id), m_hdr_attr_vals(attr_vals)
20 {
21  // nothing to do
22 }
23 
24 template <typename AttrT>
26 {
27  // nothing to do
28 }
29 
30 template <typename AttrT>
32 {
33  return new hds::db::TrSelMatchRule<AttrT>(*this);
34 }
35 
36 template <typename AttrT>
38 {
39  return m_op;
40 }
41 
42 template <typename AttrT>
44 {
45  return m_hdr_attr_id;
46 }
47 
48 template <typename AttrT>
49 const std::vector<AttrT>& hds::db::TrSelMatchRule<AttrT>::hdrAttrVals() const
50 {
51  return m_hdr_attr_vals;
52 }
53 
54 //------------------------------------------------------------------------------------------
55 
56 template <typename AttrT>
58  const AttrT &av1,
59  const AttrT &av2):
60  TrSelBaseRule(), m_hdr_attr_id(hdr_attr_id), m_range(av1,av2)
61 {
62  // nothing to do
63 }
64 
65 template <typename AttrT>
67 {
68  // nothing to do
69 }
70 
71 template <typename AttrT>
73 {
74  return new hds::db::TrSelRangeRule<AttrT>(*this);
75 }
76 
77 template <typename AttrT>
79 {
80  return TS_RANGE;
81 }
82 
83 template <typename AttrT>
85 {
86  return m_hdr_attr_id;
87 }
88 
89 template <typename AttrT>
90 const std::pair<AttrT, AttrT>& hds::db::TrSelRangeRule<AttrT>::range() const
91 {
92  return m_range;
93 }
94 
95 #endif /* tr_selector_inline.hpp */
TrSelRangeRule(TrHeaderAttrId hdr_attr_id, const AttrT &av1, const AttrT &av2)
Definition: tr_selector_inline.hpp:57
TrHeaderAttrId hdrAttrId() const
Definition: tr_selector_inline.hpp:84
Definition: tr_selector.hpp:52
virtual ~TrSelRangeRule()
Definition: tr_selector_inline.hpp:66
virtual TrSelBaseRule * clone() const
Definition: tr_selector_inline.hpp:31
virtual ~TrSelMatchRule()
Definition: tr_selector_inline.hpp:25
TrSelMatchRule(TrSelMatchOp op, TrHeaderAttrId hdr_attr_id, const AttrT &attr_val)
Definition: tr_selector_inline.hpp:7
TrHeaderAttrId hdrAttrId() const
Definition: tr_selector_inline.hpp:43
TrHeaderAttrId
Definition: tr_header_context.hpp:16
Definition: tr_selector.hpp:104
virtual TrSelBaseRule * clone() const
Definition: tr_selector_inline.hpp:72
const std::pair< AttrT, AttrT > & range() const
Definition: tr_selector_inline.hpp:90
const std::vector< AttrT > & hdrAttrVals() const
Definition: tr_selector_inline.hpp:49
Definition: tr_selector.hpp:44
TrSelMatchOp
Definition: tr_selector.hpp:30
virtual int opType() const
Definition: tr_selector_inline.hpp:78
virtual int opType() const
Definition: tr_selector_inline.hpp:37
Definition: tr_selector.hpp:149