本文整理汇总了C#中Db4objects.Db4o.Foundation.Tree类的典型用法代码示例。如果您正苦于以下问题:C# Tree类的具体用法?C# Tree怎么用?C# Tree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tree类属于Db4objects.Db4o.Foundation命名空间,在下文中一共展示了Tree类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAttemptToAddDuplicate
public override Tree OnAttemptToAddDuplicate(Tree oldNode)
{
_preceding = ((Tree)oldNode._preceding);
_subsequent = ((Tree)oldNode._subsequent);
_size = oldNode._size;
return this;
}
示例2: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
Db4objects.Db4o.Foundation.TreeString ts = (Db4objects.Db4o.Foundation.TreeString
)base.ShallowCloneInternal(tree);
ts._key = _key;
return ts;
}
示例3: AddFreeSlotNodes
private void AddFreeSlotNodes(int address, int length)
{
FreeSlotNode addressNode = new FreeSlotNode(address);
addressNode.CreatePeer(length);
_freeByAddress = Tree.Add(_freeByAddress, addressNode);
AddToFreeBySize(addressNode._peer);
}
示例4: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
var ts = (TreeString
) base.ShallowCloneInternal(tree);
ts._key = _key;
return ts;
}
示例5: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
Db4objects.Db4o.Internal.TreeIntObject tio = (Db4objects.Db4o.Internal.TreeIntObject
)base.ShallowCloneInternal(tree);
tio._object = _object;
return tio;
}
示例6: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
var tio = (TreeIntObject
) base.ShallowCloneInternal(tree);
tio._object = _object;
return tio;
}
示例7: Find
public static Db4objects.Db4o.Internal.TreeInt Find(Tree a_in, int a_key)
{
if (a_in == null)
{
return null;
}
return ((Db4objects.Db4o.Internal.TreeInt)a_in).Find(a_key);
}
示例8: Add
public static Tree Add(Tree oldTree, Tree newTree)
{
if (oldTree == null)
{
return newTree;
}
return (Tree)((Tree)oldTree).Add(newTree);
}
示例9: AddKeyCheckDuplicates
public virtual void AddKeyCheckDuplicates(int a_key)
{
if (_checkDuplicates)
{
TreeInt newNode = new TreeInt(a_key);
_candidates = Tree.Add(_candidates, newNode);
if (newNode._size == 0)
{
return;
}
}
Add(a_key);
}
示例10: LinkUp
private Tree LinkUp(Tree a_preceding, int a_level)
{
Tree node = (Tree)i_template.Read(i_bytes);
i_current++;
node._preceding = a_preceding;
node._subsequent = LinkDown(a_level + 1);
node.CalculateSize();
if (i_current < i_size)
{
return LinkUp(node, a_level - 1);
}
return node;
}
示例11: Evaluate
public virtual bool Evaluate(QPending pending)
{
QPending oldPending = (QPending)Tree.Find(_pendingJoins, pending);
if (oldPending == null)
{
pending.ChangeConstraint();
_pendingJoins = Tree.Add(_pendingJoins, pending.InternalClonePayload());
return true;
}
_pendingJoins = _pendingJoins.RemoveNode(oldPending);
oldPending._join.EvaluatePending(this, oldPending, pending._result);
return false;
}
示例12: Add
public QCandidate Add(QCandidate candidate)
{
i_root = Tree.Add(i_root, candidate);
if (candidate._size == 0)
{
// This means that the candidate was already present
// and QCandidate does not allow duplicates.
// In this case QCandidate#isDuplicateOf will have
// placed the existing QCandidate in the i_root
// variable of the new candidate. We return it here:
return candidate.GetRoot();
}
return candidate;
}
示例13: Free
public virtual Tree Free(LocalObjectContainer file, Tree treeRoot, Slot
slot)
{
file.Free(_slot.Address(), _slot.Length());
if (RemoveReferenceIsLast())
{
if (treeRoot != null)
{
return treeRoot.RemoveNode(this);
}
}
PointTo(slot);
return treeRoot;
}
示例14: AddAll
public static Tree AddAll(Tree tree, IIntIterator4 iter)
{
if (!iter.MoveNext())
{
return tree;
}
var firstAdded = new TreeInt
(iter.CurrentInt());
tree = Add(tree, firstAdded);
while (iter.MoveNext())
{
tree = tree.Add(new TreeInt(iter.CurrentInt()));
}
return tree;
}
示例15: AddAll
public static Tree AddAll(Tree tree, IIntIterator4 iter)
{
if (!iter.MoveNext())
{
return tree;
}
Db4objects.Db4o.Internal.TreeInt firstAdded = new Db4objects.Db4o.Internal.TreeInt
(iter.CurrentInt());
tree = Tree.Add(tree, firstAdded);
while (iter.MoveNext())
{
tree = tree.Add(new Db4objects.Db4o.Internal.TreeInt(iter.CurrentInt()));
}
return tree;
}