1 #ifndef BZS_DB_PROTOCOL_TDAP_CLIENT_MEMRECORD_H
2 #define BZS_DB_PROTOCOL_TDAP_CLIENT_MEMRECORD_H
36 class autoMemory :
public refarymem
41 autoMemory(
const autoMemory& p);
44 void setParams(
unsigned char* p,
size_t s,
short* endIndex,
bool own);
46 autoMemory& operator=(
const bzs::db::protocol::tdap::client::autoMemory& p);
51 static autoMemory* create(
int n);
52 static autoMemory* create();
57 #pragma warning(disable : 4251)
58 #pragma warning(disable : 4275)
59 #define ROW_MEM_BLOCK_RESERVE 4
61 #ifndef JOINLIMIT_PER_RECORD
62 #define JOINLIMIT_PER_RECORD 0
64 #if (JOINLIMIT_PER_RECORD < 1)
70 friend class multiRecordAlocatorImple;
71 friend class recordsetImple;
75 std::vector<autoMemory*> m_memblock;
77 autoMemory* m_memblock[JOINLIMIT_PER_RECORD];
92 void copyToBuffer(
table* tb,
bool updateOnly =
false)
const;
95 inline unsigned char* ptr(
int index)
const
97 for (
int i = 0; i < memBlockSize(); ++i)
98 if (*(m_memblock[i]->endFieldIndex) > index)
99 return m_memblock[i]->ptr;
104 inline const autoMemory& memBlockByField(
int index)
const
106 for (
int i = 0; i < memBlockSize(); ++i)
107 if (*(m_memblock[i]->endFieldIndex) > index)
108 return *m_memblock[i];
110 return *((autoMemory*)0);
113 inline const autoMemory& memBlock(
int index)
const
115 return *m_memblock[index];
118 inline int memBlockSize()
const {
return (
int)m_memblock.size(); }
120 inline int memBlockSize()
const {
return m_memblockSize; }
122 inline void copyFromBuffer(
const table* tb)
124 memcpy(ptr(0), tb->fieldPtr(0), m_fns->totalFieldLen());
127 void removeLastMemBlock()
131 m_memblock[memBlockSize()-1]->release();
133 m_memblock.pop_back();
140 void setRecordData(autoMemory* am,
unsigned char* ptr,
size_t size,
141 short* endFieldIndex,
bool owner =
false);
142 void releaseMemory();
147 static memoryRecord* create(fielddefs& fdinfo);
150 #pragma warning(default : 4275)
151 #pragma warning(default : 4251)
156 friend class activeTableImple;
168 void releaseMemory();
173 bool read(
bool KeysetAlrady =
false);
174 bool read(bookmark_td& bm);
176 void del(
bool KeysetAlrady =
false,
bool noSeek =
false);
177 void update(
bool KeysetAlrady =
false,
bool noSeek =
false);
188 #endif // BZS_DB_PROTOCOL_TDAP_CLIENT_MEMRECORD_H
const _TCHAR * protocol(const _TCHAR *uri)
Definition: uri.h:42
テーブルアクセスクラス (nocopyable)
Definition: table.h:89
fielddef のコレクションクラス
Definition: field.h:73
recordset フィルタリングクエリー
Definition: groupQuery.h:95
フィールドコレクションのベースクラス
Definition: fields.h:123
書き込み可能な行のクラスです。
Definition: memRecord.h:154
rowの実装クラス
Definition: memRecord.h:68