lensfun 0.2.8.0

- Main Page
- Related Pages
- Modules
- Classes
- Files
- Examples

- Class List
- Class Members

Public Member Functions | Public Attributes | List of all members
lfCamera Struct Reference
Structures and functions for cameras

Camera data. More...

`#include <lensfun.h>`

## Public Member Functions
| lfCamera ()
| Initialize a new camera object. More...
| lfCamera (const lfCamera &other)
| Copy constructor.
| ~lfCamera ()
| Destroy a camera object. More...
lfCamera & | operator= (const lfCamera &other)
| Assignment operator.
void | SetMaker (const char *val, const char *lang=NULL)
| Add a string to camera maker. More...
void | SetModel (const char *val, const char *lang=NULL)
| Add a string to camera model. More...
void | SetVariant (const char *val, const char *lang=NULL)
| Add a string to camera variant. More...
void | SetMount (const char *val)
| Set the value for camera Mount. More...
bool | Check ()
| Check if a camera object is valid. More...

## Public Attributes
lfMLstr | Maker
| Camera maker (ex: "Rollei") – same as in EXIF.
lfMLstr | Model
| Model name (ex: "Rolleiflex SL35") – same as in EXIF.
lfMLstr | Variant
| Camera variant. More...
char * | Mount
| Camera mount type (ex: "QBM")
float | CropFactor
| Camera crop factor (ex: 1.0). More...
int | Score
| Camera matching score, used while searching: not actually a camera parameter.

## Detailed Description

Camera data.

Unknown fields are set to NULL.

The Maker and Model fields must be filled EXACTLY as they appear in the EXIF data, since this is the only means to detect camera automatically. Some different cameras (e.g. Sony Cybershot) are using same EXIF id info for different models, in which case the Variant field should contain the exact model name, but, alas, we cannot automatically choose between such "twin" cameras.

Examples:
  example.c, and tfun.cpp.

## Constructor & Destructor Documentation

lfCamera::lfCamera | ( |  | ) |

Initialize a new camera object.

All fields are set to 0.

lfCamera::~lfCamera | ( |  | ) |

Destroy a camera object.

All allocated fields are freed.

## Member Function Documentation

bool lfCamera::Check | ( |  | ) |

Check if a camera object is valid.

Returns
  true if the required fields are ok.

void lfCamera::SetMaker | ( | const char * | val,
|  | const char * | lang = `NULL`
| ) |  |

Add a string to camera maker.

If lang is NULL, this replaces the default value, otherwise a new language value is appended.

Parameters

  val | The new value for the Maker field.
  lang | The language this field is in.

void lfCamera::SetModel | ( | const char * | val,
|  | const char * | lang = `NULL`
| ) |  |

Add a string to camera model.

If lang is NULL, this replaces the default value, otherwise a new language value is appended.

Parameters

  val | The new value for the Model field.
  lang | The language this field is in.

void lfCamera::SetMount | ( | const char * | val | ) |

Set the value for camera Mount.

Parameters

  val | The new value for Mount.

void lfCamera::SetVariant | ( | const char * | val,
|  | const char * | lang = `NULL`
| ) |  |

Add a string to camera variant.

If lang is NULL, this replaces the default value, otherwise a new language value is appended.

Parameters

  val | The new value for the Variant field.
  lang | The language this field is in.

## Member Data Documentation

float lfCamera::CropFactor

Camera crop factor (ex: 1.0).

Must be defined.

Examples:
  tfun.cpp.

lfMLstr lfCamera::Variant

Camera variant.

Some cameras use same EXIF id for different models

Examples:
  tfun.cpp.

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

- lensfun.h