Nebula
Loading...
Searching...
No Matches
IO::MediaType Class Reference

#include <mediatype.h>

Detailed Description

Encapsulates a MIME conformant media type description (text/plain, image/jpg, etc...).

Public Member Functions

 MediaType ()
 constructor
 
 MediaType (const Util::String &str)
 init constructor from string
 
 MediaType (const Util::String &type, const Util::String &subType)
 init constructor from type and subtype
 
 MediaType (const MediaType &rhs)
 copy constructor
 
void operator= (const MediaType &rhs)
 assignment operator
 
bool operator== (const MediaType &rhs)
 equality operator
 
bool operator!= (const MediaType &rhs)
 inequality operator
 
bool IsValid () const
 return true if not empty
 
void Clear ()
 clear the media type object
 
void Set (const Util::String &str)
 set as string (must be of the form "xxx/yyy")
 
void Set (const Util::String &type, const Util::String &subType)
 set as type and subtype
 
Util::String AsString () const
 return as string
 
const Util::StringGetType () const
 get type
 
const Util::StringGetSubType () const
 get subtype
 

Private Attributes

Util::String type
 
Util::String subType
 

Constructor & Destructor Documentation

◆ MediaType() [1/4]

IO::MediaType::MediaType ( )
inline

constructor

◆ MediaType() [2/4]

IO::MediaType::MediaType ( const Util::String & str)
inline

init constructor from string

◆ MediaType() [3/4]

IO::MediaType::MediaType ( const Util::String & type,
const Util::String & subType )
inline

init constructor from type and subtype

◆ MediaType() [4/4]

IO::MediaType::MediaType ( const MediaType & rhs)
inline

copy constructor

Member Function Documentation

◆ AsString()

Util::String IO::MediaType::AsString ( ) const
inline

return as string

◆ Clear()

void IO::MediaType::Clear ( )
inline

clear the media type object

◆ GetSubType()

const Util::String & IO::MediaType::GetSubType ( ) const
inline

get subtype

◆ GetType()

const Util::String & IO::MediaType::GetType ( ) const
inline

get type

◆ IsValid()

bool IO::MediaType::IsValid ( ) const
inline

return true if not empty

◆ operator!=()

bool IO::MediaType::operator!= ( const MediaType & rhs)
inline

inequality operator

◆ operator=()

void IO::MediaType::operator= ( const MediaType & rhs)
inline

assignment operator

◆ operator==()

bool IO::MediaType::operator== ( const MediaType & rhs)
inline

equality operator

◆ Set() [1/2]

void IO::MediaType::Set ( const Util::String & str)
inline

set as string (must be of the form "xxx/yyy")

◆ Set() [2/2]

void IO::MediaType::Set ( const Util::String & type,
const Util::String & subType )
inline

set as type and subtype

Member Data Documentation

◆ subType

Util::String IO::MediaType::subType
private

◆ type

Util::String IO::MediaType::type
private

The documentation for this class was generated from the following file: