summaryrefslogtreecommitdiff
path: root/1Tdata/xbase/xbase64-4.1.4/src/core/xbtag.cpp
blob: 621d44b3024e4de68d6fe1472cb6a68f74621774 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*  xbtag.cpp


XBase64 Software Library

Copyright (c) 1997,2003,2014,2022,2023 Gary A Kunkel

The xb64 software library is covered under the terms of the GPL Version 3, 2007 license.

Email Contact:

    XDB-devel@lists.sourceforge.net
    XDB-users@lists.sourceforge.net

*/

#include "xbase.h"

#ifdef XB_INDEX_SUPPORT


namespace xb{

/************************************************************************/
//! @brief Constructor
/*!
  \param pIx Pointer to index file instance.
  \param vpTag Pointer to tag structure within file instance.
  \param sType NDX or MDX
  \param sTagName Name of tag.
  \param sExpression Tag key definition.
  \param sFilter MDX only - tag qualification expression.
  \param bUnique xbTrue - Index is unique.<br>xbFalse - Index is not unique.
  \param bSort MDX only<br>xbTrue - Descending.<br>xbFalse - Ascending.
*/

xbTag::xbTag( xbIx *pIx, void *vpTag, xbString &sType, xbString &sTagName, xbString &sExpression, xbString &sFilter, 
xbBool bUnique, xbBool bSort )
{
  this->pIx         = pIx;
  this->vpTag       = vpTag;
  this->sType       = sType;
  this->sTagName    = sTagName;
  this->sExpression = sExpression;
  this->sFilter     = sFilter;
  this->bUnique     = bUnique;
  this->bSort       = bSort;
}


/************************************************************************/
//! @brief Get tag key expression.
/*!
  \returns Tag key expression.
*/
const xbString &xbTag::GetExpression() const {
  return sExpression;
}
/************************************************************************/
//! @brief Get tag filter expression.
/*!
  \returns Tag filter expression (mdx only).
*/

const xbString &xbTag::GetFilter() const {
  return sFilter;
}
/************************************************************************/
//! @brief Get index file pointer.
/*!
  \returns Pointer to index file instance.
*/
xbIx *xbTag::GetIx() const {
  return pIx;
}
/************************************************************************/
//! @brief Get tag ascending setting.
/*!
  \returns Tag sort setting - MDX only.<br>xbTrue - Descending.<br>xbFalse - Ascending.
*/
xbBool xbTag::GetSort() const {
  return bSort;
}
/************************************************************************/
//! @brief Get tag name.
/*!
  \returns Tag name.
*/

const xbString &xbTag::GetTagName() const {
  return sTagName;
}
/************************************************************************/
//! @brief Get tag type.
/*!
  \returns Tag type.
*/
const xbString &xbTag::GetType() const {
  return sType;
}

/************************************************************************/
//! @brief Get tag unique setting.
/*!
  \returns Tag unique setting.<br>xbTrue - Unique.<br>xbFalse - Not unique.
*/

xbBool xbTag::GetUnique() const {
  return bUnique;
}
/************************************************************************/
//! @brief Get tag pointer for tag within index file.
/*!
  \returns Pointer to tag within index file instance.
*/
void *xbTag::GetVpTag() const {
  return vpTag;
}
/************************************************************************/
}   /* namespace */ 
#endif         /*  XB_INDEX_SUPPORT */