public void Dispose() { tagGroupAttr = null; tagGroup = null; tagDefinition = null; ReferencesClear(); BadReferencesClear(); Close(); }
/// <summary> /// Attaches this tag manager to the specified tag definition /// </summary> /// <param name="tag_def"></param> /// <remarks>don't pull any funny tricks and pass a non-tag-group definition....</remarks> public void Manage(Definition tag_def) { tag_def.SetupState(); // just in-case if (tagDefinition != null) { tagDefinition = null; } tagDefinition = tag_def; tagGroupAttr = tag_def.Attribute as TagGroupAttribute; ManageSetupTagGroup(); tag_def.SetOwnerObject(this); }
/// <summary> /// Manages a new tag of type <paramref name="tag_group" /> /// </summary> /// <param name="tag_group">Tag group which we'll be handling</param> public void Manage(TagGroup tag_group) { if (tagDefinition != null) { tagDefinition = null; } if (tag_group.Definition == null) { Debug.Assert.If(false, "Tried to manage a tag using a group ({2}) with no definition. {0}:{1}", engine, this.Name, tag_group); } tagDefinition = tag_group.Definition.NewInstance(null); tagGroupAttr = TagGroupAttribute.FromType(tagDefinition.GetType()); tagGroup = tag_group; tagDefinition.SetOwnerObject(this); }
void Reset(ITagIndex owner, BlamVersion version) { if (owner != null) { ownerId = owner.IndexId; flags.Add(owner is CacheTagIndex, IO.ITagStreamFlags.ResidesInCacheFile); } tagIndex = Blam.DatumIndex.Null; headerGroupTag = uint.MaxValue; headerVersion = -1; headerSignature = uint.MaxValue; tagGroupAttr = null; tagGroup = null; tagDefinition = null; Close(); engine = version; DetermineEndianState(InCache); }