DCL 3.7.4
Loading...
Searching...
No Matches
SiblingLink Class Reference

#include <LinkUtility.h>

Public Member Functions

 SiblingLink (TextTemplate *pSource, const String &strDetailPage, const String &strListEnc)
void assign (TextTemplate *pDest, _CONST SQLFields &fields)
void assign (TextTemplate *pDest, _CONST SQLFields &fields, const String &strListEnc)

Protected Attributes

TextTemplate__pSource
TextTemplate__pPREV
TextTemplate__pNEXT
TextTemplate__pNPREV
TextTemplate__pNNEXT

Detailed Description

Definition at line 53 of file LinkUtility.h.

Constructor & Destructor Documentation

◆ SiblingLink()

SiblingLink::SiblingLink ( TextTemplate * pSource,
const String & strDetailPage,
const String & strListEnc )

Definition at line 111 of file LinkUtility.cpp.

116{
117 __pSource = pSource;
118 __pPREV = NULL;
119 __pNEXT = NULL;
120 __pNPREV = NULL;
121 __pNNEXT = NULL;
122
123 if (pSource) {
124 __pPREV = &(*__pSource)[L"_PREV"];
125 __pNEXT = &(*__pSource)[L"_NEXT"];
126
127 __pNPREV = &(*__pSource)[L"N_PREV"];
128 __pNNEXT = &(*__pSource)[L"N_NEXT"];
129
130 __pPREV->assign(L"DETAIL", strDetailPage);
131 __pPREV->assign(L"_LIST", strListEnc);
132 __pNEXT->assign(L"DETAIL", strDetailPage);
133 __pNEXT->assign(L"_LIST", strListEnc);
134 }
135}
#define NULL
Definition Config.h:312

Member Function Documentation

◆ assign() [1/2]

void SiblingLink::assign ( TextTemplate * pDest,
_CONST SQLFields & fields )

Definition at line 137 of file LinkUtility.cpp.

141{
142 if (__pSource) {
143 int nPREV_ID = fields.byName(L"PREV_ID").asInteger();
144 int nNEXT_ID = fields.byName(L"NEXT_ID").asInteger();
145
146 if (nPREV_ID > 0) {
147 __pPREV->assign(L"PREV_ID", String::valueOf(nPREV_ID));
148 pDest->assign(L"_PREV", *__pPREV);
149 }
150 else
151 pDest->assign(L"_PREV", *__pNPREV);
152
153 if (nNEXT_ID > 0) {
154 __pNEXT->assign(L"NEXT_ID", String::valueOf(nNEXT_ID));
155 pDest->assign(L"_NEXT", *__pNEXT);
156 }
157 else
158 pDest->assign(L"_NEXT", *__pNNEXT);
159 }
160}

◆ assign() [2/2]

void SiblingLink::assign ( TextTemplate * pDest,
_CONST SQLFields & fields,
const String & strListEnc )

Definition at line 162 of file LinkUtility.cpp.

167{
168 if (__pSource) {
169 __pPREV->assign(L"_LIST", strListEnc);
170 __pNEXT->assign(L"_LIST", strListEnc);
171
172 assign(pDest, fields);
173 }
174}

Member Data Documentation

◆ __pNEXT

TextTemplate* SiblingLink::__pNEXT
protected

Definition at line 59 of file LinkUtility.h.

◆ __pNNEXT

TextTemplate* SiblingLink::__pNNEXT
protected

Definition at line 62 of file LinkUtility.h.

◆ __pNPREV

TextTemplate* SiblingLink::__pNPREV
protected

Definition at line 61 of file LinkUtility.h.

◆ __pPREV

TextTemplate* SiblingLink::__pPREV
protected

Definition at line 58 of file LinkUtility.h.

◆ __pSource

TextTemplate* SiblingLink::__pSource
protected

Definition at line 56 of file LinkUtility.h.


The documentation for this class was generated from the following files: