lensfun: lfMount Struct Reference

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

- Class List
- Class Members

# lfMount Struct Reference
[Structures and functions for camera mounts]

This structure contains everything specific to a camera mount. More...

`#include <lensfun.h>`

List of all members.

## Public Member Functions
| lfMount ()
| Initialize a new mount object.
lfMount & | operator= (const lfMount &other)
| Assignment operator.
| ~lfMount ()
| Destroy a mount object.
void | SetName (const char *val, const char *lang=NULL)
| Add a string to mount name.
void | AddCompat (const char *val)
| Add a mount name to the list of compatible mounts.
bool | Check ()
| Check if a mount object is valid.
## Public Attributes
lfMLstr | Name
| Camera mount name.
char ** | Compat
| A list of compatible mounts.

## Detailed Description

This structure contains everything specific to a camera mount.

Objects of this type are usually retrieved from the database by using queries (see lfDatabase::FindMount() / lf_db_find_mount()), and can be created manually in which case it is application's responsability to destroy the object when it is not needed anymore.

Examples:

  example.c, and tfun.cpp.

## Constructor & Destructor Documentation

lfMount::lfMount | ( |  | ) |

Initialize a new mount object.

All fields are set to 0.

lfMount::~lfMount | ( |  | ) |

Destroy a mount object.

All allocated fields are freed.

## Member Function Documentation

void lfMount::SetName | ( | const char * | val,
|  | const char * | lang = `NULL` |
| ) |  |  |

Add a string to mount name.

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

Parameters:

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

void lfMount::AddCompat | ( | const char * | val | ) |

Add a mount name to the list of compatible mounts.

Parameters:

  | val | The identifier of the compatible mount.

bool lfMount::Check | ( |  | ) |

Check if a mount object is valid.

Returns:
  true if required fields are ok.

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

- lensfun.h