Ejemplo n.º 1
0
std::ostream& operator<<( std::ostream& flux, const UnknownProperties& unknownProperties )
{
	flux << separator << " Unknown stream " << separator << std::endl;

	PropertyVector properties = unknownProperties.getPropertiesAsVector();
	for( PropertyVector::iterator it = properties.begin(); it != properties.end(); ++it )
	{
		flux << std::setw( keyWidth ) << it->first << ": " << it->second << std::endl;
	}

	return flux;
}
std::ostream& operator<<(std::ostream& flux, const SubtitleProperties& subtitleProperties)
{
    flux << detail::separator << " Subtitle stream " << detail::separator << std::endl;

    PropertyVector properties = subtitleProperties.asVector();
    for(PropertyVector::iterator it = properties.begin(); it != properties.end(); ++it)
    {
        flux << std::setw(detail::keyWidth) << it->first << ": " << it->second << std::endl;
    }

    return flux;
}
Ejemplo n.º 3
0
std::ostream& operator<<( std::ostream& flux, const FileProperties& fileProperties )
{
	flux << std::left;
	flux << separator << " Wrapper " << separator << std::endl;

	PropertyVector properties = fileProperties.getPropertiesAsVector();
	for( PropertyVector::iterator it = properties.begin(); it != properties.end(); ++it )
	{
		flux << std::setw( keyWidth ) << it->first << ": " << it->second << std::endl;
	}

	return flux;
}
Ejemplo n.º 4
0
inline bool
JSONParserBase::finishObject(MutableHandleValue vp, PropertyVector& properties)
{
    MOZ_ASSERT(&properties == &stack.back().properties());

    JSObject* obj = ObjectGroup::newPlainObject(cx, properties.begin(), properties.length(), GenericObject);
    if (!obj)
        return false;

    vp.setObject(*obj);
    if (!freeProperties.append(&properties))
        return false;
    stack.popBack();

    if (!stack.empty() && stack.back().state == FinishArrayElement) {
        const ElementVector& elements = stack.back().elements();
        if (!CombinePlainObjectPropertyTypes(cx, obj, elements.begin(), elements.length()))
            return false;
    }

    return true;
}