- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# fipTag Class Reference

`#include <FreeImagePlus.h>`

Inheritance diagram for fipTag:

List of all members.

## Detailed Description

FreeImage Tag.

FreeImage uses this structure to store metadata information.

## Public Member Functions
| operator FITAG * ()
| Returns a pointer to the FITAG data.
BOOL | isValid () const
| Returns TRUE if the tag is allocated, FALSE otherwise.
const char * | toString (FREE_IMAGE_MDMODEL model, char *Make=NULL) const
| Converts a FreeImage tag structure to a string that represents the interpreted tag value.
Creation & Destruction
| fipTag ()
| Constructor.
virtual | ~fipTag ()
| Destructor.
BOOL | setKeyValue (const char *key, const char *value)
| Construct a FIDT_ASCII tag (ASCII string).
Copying
| fipTag (const fipTag &tag)
| Copy constructor.
fipTag & | operator= (const fipTag &tag)
| Copy constructor.
fipTag & | operator= (FITAG *tag)
| Assignement operator</b> Copy the input pointer and manage its destruction
Tag accessors
const char * | getKey () const
| Returns the tag field name (unique inside a metadata model).
const char * | getDescription () const
| Returns the tag description if available, returns NULL otherwise.
WORD | getID () const
| Returns the tag ID if available, returns 0 otherwise.
FREE_IMAGE_MDTYPE | getType () const
| Returns the tag data type.
DWORD | getCount () const
| Returns the number of components in the tag (in tag type units).
DWORD | getLength () const
| Returns the length of the tag value in bytes.
const void * | getValue () const
| Returns the tag value.
BOOL | setKey (const char *key)
| Set the tag field name.
BOOL | setDescription (const char *description)
| Set the (usually optional) tag description.
BOOL | setID (WORD id)
| Set the (usually optional) tad ID.
BOOL | setType (FREE_IMAGE_MDTYPE type)
| Set the tag data type.
BOOL | setCount (DWORD count)
| Set the number of data in the tag.
BOOL | setLength (DWORD length)
| Set the length of the tag value, in bytes.
BOOL | setValue (const void *value)
| Set the tag value.
## Protected Attributes
FITAG * | _tag
| Pointer to a FreeImage tag.

## Constructor & Destructor Documentation

fipTag::fipTag | ( |  | ) |

Constructor.

See also:
  FreeImage_CreateTag

virtual fipTag::~fipTag | ( |  | ) | `[virtual]`

Destructor.

See also:
  FreeImage_DeleteTag

fipTag::fipTag | ( | const fipTag & | tag | ) |

Copy constructor.

See also:
  FreeImage_CloneTag

## Member Function Documentation

BOOL fipTag::setKeyValue | ( | const char * | key,
|  | const char * | value |
| ) |  |  |

Construct a FIDT_ASCII tag (ASCII string).

This method is useful to store comments or IPTC tags.

Parameters:

  | name | Field name
  | value | Field value

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_CreateTag

fipTag& fipTag::operator= | ( | const fipTag & | tag | ) |

Copy constructor.

See also:
  FreeImage_CloneTag

fipTag& fipTag::operator= | ( | FITAG * | tag | ) |

Assignement operator</b>
Copy the input pointer and manage its destruction

See also:
  operator FITAG*()

fipTag::operator FITAG * | ( |  | ) | `[inline]`

Returns a pointer to the FITAG data.

Used for direct access from FREEIMAGE functions or from your own low level C functions.

See also:
  operator=(FITAG *tag)

BOOL fipTag::isValid | ( |  | ) | const`[virtual]`

Returns TRUE if the tag is allocated, FALSE otherwise.

Implements fipObject.

const char* fipTag::getKey | ( |  | ) | const

Returns the tag field name (unique inside a metadata model).

See also:
  FreeImage_GetTagKey

const char* fipTag::getDescription | ( |  | ) | const

Returns the tag description if available, returns NULL otherwise.

See also:
  FreeImage_GetTagDescription

WORD fipTag::getID | ( |  | ) | const

Returns the tag ID if available, returns 0 otherwise.

See also:
  FreeImage_GetTagID

FREE_IMAGE_MDTYPE fipTag::getType | ( |  | ) | const

Returns the tag data type.

See also:
  FreeImage_GetTagType

DWORD fipTag::getCount | ( |  | ) | const

Returns the number of components in the tag (in tag type units).

See also:
  FreeImage_GetTagCount

DWORD fipTag::getLength | ( |  | ) | const

Returns the length of the tag value in bytes.

See also:
  FreeImage_GetTagLength

const void* fipTag::getValue | ( |  | ) | const

Returns the tag value.

See also:
  FreeImage_GetTagValue

BOOL fipTag::setKey | ( | const char * | key | ) |

Set the tag field name.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagKey

BOOL fipTag::setDescription | ( | const char * | description | ) |

Set the (usually optional) tag description.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagDescription

BOOL fipTag::setID | ( | WORD | id | ) |

Set the (usually optional) tad ID.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagID

BOOL fipTag::setType | ( | FREE_IMAGE_MDTYPE | type | ) |

Set the tag data type.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagType

BOOL fipTag::setCount | ( | DWORD | count | ) |

Set the number of data in the tag.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagCount

BOOL fipTag::setLength | ( | DWORD | length | ) |

Set the length of the tag value, in bytes.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagLength

BOOL fipTag::setValue | ( | const void * | value | ) |

Set the tag value.

Returns:
  Returns TRUE if successful, returns FALSE otherwise

See also:
  FreeImage_SetTagValue

const char* fipTag::toString | ( | FREE_IMAGE_MDMODEL | model,
|  | char * | Make = `NULL` |
| ) |  |  | const

Converts a FreeImage tag structure to a string that represents the interpreted tag value.

Parameters:

  | model | Metadata model specification (metadata model from which the tag was extracted)
  | Make | Camera model (not used yet)

## Member Data Documentation

FITAG* fipTag::_tag`[protected]`

Pointer to a FreeImage tag.

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

- FreeImagePlus.h