lensfun: lfCamera Struct Reference

lensfun 0.3.1.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. Unknown fields are set to NULL. More...

`#include <lensfun.h>`

## Public Member Functions
| lfCamera ()
| Initialize a new camera object. All fields are set to 0.
| lfCamera (const lfCamera &other)
| ~lfCamera ()
| Destroy a camera object. All allocated fields are freed.
lfCamera & | operator= (const lfCamera &other)
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. Some cameras use same EXIF id for different models.
char * | Mount
| Camera mount type (ex: "QBM")
float | CropFactor
| Camera crop factor (ex: 1.0). Must be defined.
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 (upper/lowercase is not important, though). 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, lenstool.cpp, and tfun.cpp.

## Constructor & Destructor Documentation

lfCamera::lfCamera | ( | const lfCamera & | other | ) |

Copy constructor.

## Member Function Documentation

bool lfCamera::Check | ( |  | ) |

Check if a camera object is valid.

Returns
  true if the required fields are ok.

lfCamera& lfCamera::operator= | ( | const lfCamera & | other | ) |

Assignment operator

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.

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

- lensfun.h