lensfun  0.3.1.0
Public Member Functions | Public Attributes | List of all members
lfCamera Struct Reference

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.
 
lfCameraoperator= (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::lfCamera ( const lfCamera other)

Copy constructor.

Member Function Documentation

◆ Check()

bool lfCamera::Check ( )

Check if a camera object is valid.

Returns
true if the required fields are ok.

◆ operator=()

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

Assignment operator

◆ SetMaker()

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
valThe new value for the Maker field.
langThe language this field is in.

◆ SetModel()

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
valThe new value for the Model field.
langThe language this field is in.

◆ SetMount()

void lfCamera::SetMount ( const char *  val)

Set the value for camera Mount.

Parameters
valThe new value for Mount.

◆ SetVariant()

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
valThe new value for the Variant field.
langThe language this field is in.

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