public override void Initialise(MHParseNode p, MHEngine engine)
        {
            base.Initialise(p, engine);
            // Original value should be an Content reference.
            MHParseNode pInitial = p.GetNamedArg(ASN1Codes.C_ORIGINAL_VALUE);
            // and this should be a ObjRef node.
            MHParseNode pArg = pInitial.GetNamedArg(ASN1Codes.C_CONTENT_REFERENCE);

            m_OriginalValue.Initialise(pArg.GetArgN(0), engine);
        }
Exemple #2
0
        // Set this up from the parse tree.
        public override void Initialise(MHParseNode p, MHEngine engine)
        {
            base.Initialise(p, engine);
            Logging.Assert(m_ObjectIdentifier.ObjectNo > 0);
            MHParseNode pIA = p.GetNamedArg(ASN1Codes.C_INITIALLY_ACTIVE);

            if (pIA != null)
            {
                m_fInitiallyActive = pIA.GetArgN(0).GetBoolValue();
            }

            MHParseNode pCHook = p.GetNamedArg(ASN1Codes.C_CONTENT_HOOK);

            if (pCHook != null)
            {
                m_nContentHook = pCHook.GetArgN(0).GetIntValue();
            }

            MHParseNode pOrigContent = p.GetNamedArg(ASN1Codes.C_ORIGINAL_CONTENT);

            if (pOrigContent != null)
            {
                MHParseNode pArg = pOrigContent.GetArgN(0);
                // Either a string - included content.
                if (pArg.NodeType == MHParseNode.PNString)
                {
                    m_ContentType = IN_IncludedContent;
                    pArg.GetStringValue(m_OrigIncludedContent);
                }
                else
                { // or a sequence - referenced content.
                    // In the text version this is tagged with :ContentRef
                    m_ContentType = IN_ReferencedContent;
                    m_OrigContentRef.Initialise(pArg.GetArgN(0), engine);
                    MHParseNode pContentSize = pArg.GetNamedArg(ASN1Codes.C_CONTENT_SIZE);
                    if (pContentSize != null)
                    {
                        m_nOrigContentSize = pContentSize.GetArgN(0).GetIntValue();
                    }
                    MHParseNode pCCPrio = pArg.GetNamedArg(ASN1Codes.C_CONTENT_CACHE_PRIORITY);
                    if (pCCPrio != null)
                    {
                        m_nOrigCCPrio = pCCPrio.GetArgN(0).GetIntValue();
                    }
                }
            }

            MHParseNode pShared = p.GetNamedArg(ASN1Codes.C_SHARED);

            if (pShared != null)
            {
                m_fShared = pShared.GetArgN(0).GetBoolValue();
            }
        }