lfCamera Struct Reference
[Structures and functions for cameras]

Camera data. More...

#include <lensfun.h>

List of all members.

Public Member Functions

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

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.
char * Mount
 Camera mount type (ex: "QBM").
float CropFactor
 Camera crop factor (ex: 1.0).
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

Camera crop factor (ex: 1.0).

Must be defined.

Examples:
tfun.cpp.

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:

Generated on 6 Mar 2010 for lensfun by  doxygen 1.6.1