本文整理汇总了C#中Db4objects.Db4o.Foundation.Tree类的典型用法代码示例。如果您正苦于以下问题:C# Tree类的具体用法?C# Tree怎么用?C# Tree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tree类属于Db4objects.Db4o.Foundation命名空间,在下文中一共展示了Tree类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnAttemptToAddDuplicate
public override Tree OnAttemptToAddDuplicate(Tree oldNode)
{
_preceding = ((Tree)oldNode._preceding);
_subsequent = ((Tree)oldNode._subsequent);
_size = oldNode._size;
return this;
}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:IdSlotTree.cs
示例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;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:TreeString.cs
示例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);
}
开发者ID:superyfwy,项目名称:db4o,代码行数:7,代码来源:InMemoryFreespaceManager.cs
示例4: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
var ts = (TreeString
) base.ShallowCloneInternal(tree);
ts._key = _key;
return ts;
}
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:TreeString.cs
示例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;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:7,代码来源:TreeIntObject.cs
示例6: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
var tio = (TreeIntObject
) base.ShallowCloneInternal(tree);
tio._object = _object;
return tio;
}
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:TreeIntObject.cs
示例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);
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:TreeInt.cs
示例8: Add
public static Tree Add(Tree oldTree, Tree newTree)
{
if (oldTree == null)
{
return newTree;
}
return (Tree)((Tree)oldTree).Add(newTree);
}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:Tree.cs
示例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);
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:13,代码来源:IdListQueryResult.cs
示例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;
}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:13,代码来源:TreeReader.cs
示例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;
}
开发者ID:Galigator,项目名称:db4o,代码行数:13,代码来源:QCandidateBase.cs
示例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;
}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:QCandidates.cs
示例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;
}
开发者ID:masroore,项目名称:db4o,代码行数:14,代码来源:ReferencedSlot.cs
示例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;
}
开发者ID:masroore,项目名称:db4o,代码行数:15,代码来源:TreeInt.cs
示例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;
}
开发者ID:erdincay,项目名称:db4o,代码行数:15,代码来源:TreeInt.cs
示例16: FindConstructor
private static ReflectConstructorSpec FindConstructor(IReflectClass claxx, Tree sortedConstructors
)
{
if (sortedConstructors == null)
{
return ReflectConstructorSpec.InvalidConstructor;
}
IEnumerator iter = new TreeNodeIterator(sortedConstructors);
while (iter.MoveNext())
{
var current = iter.Current;
var constructor = (IReflectConstructor) ((TreeIntObject) current)._object;
var args = NullArgumentsFor(constructor);
var res = constructor.NewInstance(args);
if (res != null)
{
return new ReflectConstructorSpec(constructor, args);
}
}
return ReflectConstructorSpec.InvalidConstructor;
}
开发者ID:masroore,项目名称:db4o,代码行数:21,代码来源:ConstructorSupport.cs
示例17: SetSizeOwnPlus
public void SetSizeOwnPlus(Tree tree)
{
_size = OwnSize() + tree._size;
}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:Tree.cs
示例18: Compare
public override int Compare(Tree a_to)
{
return _key - ((Db4objects.Db4o.Internal.TreeInt)a_to)._key;
}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:TreeInt.cs
示例19: ShallowCloneInternal
protected override Tree ShallowCloneInternal(Tree tree)
{
Db4objects.Db4o.Internal.TreeInt treeint = (Db4objects.Db4o.Internal.TreeInt)base
.ShallowCloneInternal(tree);
treeint._key = _key;
return treeint;
}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:TreeInt.cs
示例20: ShallowCloneInternal
// Keep the debug method to debug the depth
// public final void debugLeafDepth(int currentDepth){
// currentDepth++;
// if(_preceding == null && _subsequent == null){
// System.out.println("" + currentDepth + " tree leaf depth.");
// return;
// }
// if (_preceding != null){
// _preceding.debugLeafDepth(currentDepth);
// }
// if(_subsequent != null){
// _subsequent.debugLeafDepth(currentDepth);
// }
// }
protected virtual Tree ShallowCloneInternal(Tree tree)
{
tree._preceding = _preceding;
tree._size = _size;
tree._subsequent = _subsequent;
return tree;
}
开发者ID:erdincay,项目名称:db4o,代码行数:21,代码来源:Tree.cs
注:本文中的Db4objects.Db4o.Foundation.Tree类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论