Example #1
0
XSLTInputSource&
XSLTInputSource::operator=(const XSLTInputSource&   theRHS)
{
    if (this != &theRHS)
    {
        m_stream = theRHS.m_stream;
        m_node = theRHS.m_node;

        setIssueFatalErrorIfNotFound(theRHS.getIssueFatalErrorIfNotFound());

        const XMLCh*    theValue = theRHS.getSystemId();

        if (theValue != 0)
        {
            setSystemId(theValue);
        }

        theValue = theRHS.getPublicId();

        if (theValue != 0)
        {
            setPublicId(theValue);
        }

        theValue = theRHS.getEncoding();

        if (theValue != 0)
        {
            setEncoding(theValue);
        }

    }

    return *this;
}
Example #2
0
// $$$ ToDo:  Xerces' InputSource class does not yet have a copy
// constructor or assignment operator.  See bug #7944.
XSLTInputSource::XSLTInputSource(
            const XSLTInputSource&  theSource,
            MemoryManager&          theMemoryManager) :
    InputSource(&theMemoryManager),
    m_stream(theSource.m_stream),
    m_node(theSource.m_node)
{
    setIssueFatalErrorIfNotFound(theSource.getIssueFatalErrorIfNotFound());

    const XMLCh*    theValue = theSource.getSystemId();

    if (theValue != 0)
    {
        setSystemId(theValue);
    }

    theValue = theSource.getPublicId();

    if (theValue != 0)
    {
        setPublicId(theValue);
    }

    theValue = theSource.getEncoding();

    if (theValue != 0)
    {
        setEncoding(theValue);
    }
}
void YubikoOtpKeyConfig::load() {
	BOOST_LOG_NAMED_SCOPE("YubikoOtpKeyConfig::load");
	const string myInFile = checkFileName(false);
	ptree myTree;
	read_json(myInFile, myTree);
	const string myVer(myTree.get<string>(K_NM_DOC_VERS));
	BOOST_LOG_TRIVIAL(info)<< K_NM_VERS << ":" << myVer;
	setPrivateId(myTree.get<string>(K_NM_DOC_PRIV_ID));
	setPublicId(myTree.get<string>(K_NM_DOC_PUB_ID));
	setSecretKey(myTree.get<string>(K_NM_DOC_SEC_KEY));
	setTimestamp(UTimestamp(myTree.get<uint64_t>(K_NM_DOC_TIMESTAMP)));
	setCounter(myTree.get<uint8_t>(K_NM_DOC_SES_CNTR));
	setCrc(myTree.get<uint16_t>(K_NM_DOC_CRC));
	setRandom(myTree.get<uint16_t>(K_NM_DOC_RANDOM));
	setUseCounter(myTree.get<uint8_t>(K_NM_DOC_USE_CNTR));
	setDescription(myTree.get<string>(K_NM_DOC_DESC));
	if (myVer != "0.0.1") {
		const string mySysUser { myTree.get<string>(K_NM_DOC_SYS_USER) };
		if (!mySysUser.empty())
			setSysUser(mySysUser);
	}
	itsChangedFlag = false;
}