VMime
htmlTextPart::embeddedObject Class Reference

#include <htmlTextPart.hpp>

Inheritance diagram for htmlTextPart::embeddedObject:
Collaboration diagram for htmlTextPart::embeddedObject:

Public Types

enum  ReferenceType { REFERENCED_BY_ID , REFERENCED_BY_LOCATION }
 

Public Member Functions

 embeddedObject (shared_ptr< contentHandler > data, const encoding &enc, const string &id, const mediaType &type, const ReferenceType refType)
 
shared_ptr< const contentHandlergetData () const
 
const vmime::encoding getEncoding () const
 
const string getId () const
 
const string getReferenceId () const
 
const mediaType getType () const
 
ReferenceType getReferenceType () const
 
bool matchesId (const string &id) const
 

Additional Inherited Members

- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

Embedded object (eg: image for <IMG> tag).

Member Enumeration Documentation

◆ ReferenceType

The ways embedded objects can be referenced.

Enumerator
REFERENCED_BY_ID 

Referenced by Content-Id.

REFERENCED_BY_LOCATION 

Referenced by Content-Location.

Constructor & Destructor Documentation

◆ embeddedObject()

embeddedObject ( shared_ptr< contentHandler data,
const encoding enc,
const string id,
const mediaType type,
const ReferenceType  refType 
)

Constructs an embedded object.

Parameters
datacontent of the object
encencoding of the data
idobject identifier
typeobject content type
refTypereference type
Returns
a reference to a new embedded object

Member Function Documentation

◆ getData()

shared_ptr< const contentHandler > getData ( ) const

Return data stored in this embedded object.

Returns
stored data

◆ getEncoding()

const vmime::encoding getEncoding ( ) const

Return the encoding used for data in this embedded object.

Returns
data encoding

◆ getId()

const string getId ( ) const

Returns the identifier of this embedded object (either a unique ID or a location).

Returns
object identifier

◆ getReferenceId()

const string getReferenceId ( ) const

Return the identifier used to reference this embedded object in a text document (for example, you can use the result as the "src" attribute of an <img> tag).

Returns
object reference identifier

◆ getReferenceType()

htmlTextPart::embeddedObject::ReferenceType getReferenceType ( ) const

Returns the way this object is referenced.

Returns
reference type (see ReferenceType enum)

◆ getType()

const mediaType getType ( ) const

Return the content type of data stored in this embedded object.

Returns
data type

◆ matchesId()

bool matchesId ( const string id) const

Returns whether this object matches the specified identifier.

Parameters
ididentifier to test
Returns
true if the specified identifier references this object, or false otherwise

References vmime::dynamicCast().


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