Exemple #1
0
bool TRFactory::readTagAndValueLine(const string& inString, TRDescription& outDescription)
{
    bool theSuccess = false;
    char theTag[maxLineLength];
    char theValue[maxLineLength];

    // Zero them out
    memset(theTag, ' ', maxLineLength);
    memset(theValue, ' ', maxLineLength);

    if((sscanf(inString.c_str(), "%s = %s", theTag, theValue)) == 2)
    {
        // Add it
        TRTagValuePair thePair(theTag, theValue);
        outDescription.AddPair(thePair);
        theSuccess = true;
    }

    return theSuccess;
}