Esempio n. 1
0
void c4_CustomHandler::Set(int index_, const c4_Bytes& buf_)
{
  int colnum = _seq->PropIndex(Property().GetId());
  d4_assert(colnum >= 0);
  
  _seq->DoSet(index_, colnum, buf_);
}
int c4_CustomHandler::ItemSize(int index_) {
  c4_Bytes &buf = _seq->Buffer();

  int colnum = _seq->PropIndex(Property().GetId());
  d4_assert(colnum >= 0);

  if (!_seq->DoGet(index_, colnum, buf))
    return 0;

  return buf.Size();
}
const void *c4_CustomHandler::Get(int index_, int &length_) {
  c4_Bytes &buf = _seq->Buffer();

  int colnum = _seq->PropIndex(Property().GetId());
  d4_assert(colnum >= 0);

  if (!_seq->DoGet(index_, colnum, buf))
    ClearBytes(buf);

  length_ = buf.Size();
  return buf.Contents();
}