Source: doctypeinfo.h


Annotated List
Files
Globals
Hierarchy
Index
// -*- c++ -*-

#ifndef DOCTYPEINFO_H
#define DOCTYPEINFO_H

#include 

class QStyleSheet;
class DocTypeViewManager;

/**
 * Information about a particular type of document.
 *
 * @author Richard Moore, rich@kde.org
 * @version $Id: doctypeinfo_h.html,v 1.1.1.1 2001/11/29 18:18:33 rich Exp $
 */
class DocTypeInfo
{
public:
    DocTypeInfo() : nullInfo(true) {}

    DocTypeInfo( const QString &id, const QString &name, const QString &desc, const QString &mime )
	: nullInfo(false),
	  typeId( id ), 
	  name_( name ), desc( desc ), 
	  mime( mime ) {}

    DocTypeInfo( const DocTypeInfo &info )
	: nullInfo(info.nullInfo), 
	typeId( info.typeId ), 
	name_( info.name_ ), desc( info.desc ), 
	mime( info.mime ) {}

    ~DocTypeInfo() {}

    DocTypeInfo &operator= ( const DocTypeInfo &dti );
    bool operator< ( const DocTypeInfo &dti ) const;

    /** Returns true if the object is null. */
    bool isNull() const { return nullInfo; }

    /** Return the id string use to find resources for this doctype. */
    QString id() const { return typeId; }

    QString name() const { return name_; }
    QString description() const { return desc; }
    QString mimeType() const { return mime; }



private:
    bool nullInfo;
    QString typeId;
    QString name_;
    QString desc;
    QString mime;
};

inline DocTypeInfo &DocTypeInfo::operator=( const DocTypeInfo &dti )
{
    nullInfo = dti.nullInfo;
    typeId = dti.typeId;
    name_ = dti.name_;
    desc = dti.desc;
    mime = dti.mime;
    return *this;
}

inline bool DocTypeInfo::operator<( const DocTypeInfo &/*dti1*/ ) const
{
    return false;
}

#endif // DOCTYPEINFO_H

// Local Variables:
// c-basic-offset: 4
// End:


Generated by: rich on pegasus on Fri Nov 9 01:30:42 2001, using kdoc 2.0a53.