Example #1
0
/// Construct an empty view with one property
c4_View::c4_View (const c4_Property& prop_)
  : _seq (d4_new c4_HandlerSeq (0))
{          
  _IncSeqRef();

  _seq->PropIndex(prop_);
}
Example #2
0
File: store.cpp Project: aosm/tcl
void c4_Storage::Initialize(c4_Strategy &strategy_, bool owned_, int mode_) {
  c4_Persist *pers = d4_new c4_Persist(strategy_, owned_, mode_);
  c4_HandlerSeq *seq = d4_new c4_HandlerSeq(pers);
  seq->DefineRoot();
  *(c4_View*)this = seq;
  pers->SetRoot(seq);
}
Example #3
0
/// Construct a view based on an input stream
c4_View::c4_View (c4_Stream* stream_)
  : _seq (c4_Persist::Load(stream_))
{
  if (_seq == 0)
    _seq = d4_new c4_HandlerSeq (0);

  _IncSeqRef();
}
Example #4
0
/// Construct a view based on a sequence
c4_View::c4_View (c4_Sequence* seq_)
  : _seq (seq_)
{          
  if (!_seq)
    _seq = d4_new c4_HandlerSeq (0);

  _IncSeqRef();
}
Example #5
0
c4_Cursor c4_Row::Allocate() {
  c4_Sequence *seq = d4_new c4_HandlerSeq(0);
  seq->IncRef();

  seq->Resize(1);

  return c4_Cursor(*seq, 0);
}
c4_HandlerSeq &c4_FormatV::At(int index_) {
  d4_assert(_inited);

  c4_HandlerSeq * &hs = (c4_HandlerSeq * &)_subSeqs.ElementAt(index_);
  if (hs == 0) {
    hs = d4_new c4_HandlerSeq(Owner(), this);
    hs->IncRef();
  }

  return  *hs;
}
Example #7
0
File: persist.cpp Project: aosm/tcl
bool c4_Persist::Rollback(bool full_) {
  _root->DetachFromParent();
  _root->DetachFromStorage(true);
  _root = 0;

  if (_space != 0)
    _space->Initialize();

  c4_HandlerSeq *seq = d4_new c4_HandlerSeq(this);
  seq->DefineRoot();
  SetRoot(seq);

  if (full_) {
    delete _differ;
    _differ = 0;
  }

  LoadAll();

  return _strategy._failure == 0;
}