KockpitUnitMap Class Reference

Class for attribute mapping. More...

#include <kockpitunitmap.h>

Collaboration diagram for KockpitUnitMap:
Collaboration graph
[legend]

Public Member Functions

 KockpitUnitMap ()
 Standard constructor.
 KockpitUnitMap (KockpitUser *kuser, const QStringList &mapfiles, QObject *parent=0)
 Constructor.
 KockpitUnitMap (KockpitGroup *kgrp, const QStringList &mapfiles, QObject *parent=0)
 Constructor.
 KockpitUnitMap (const KockpitUnitMap &kmap)
 Copy constructor.
virtual ~KockpitUnitMap ()
 Destructor.
void deleteKunit ()
 Delete Kunit.
virtual KockpitUnit * getKunit () const
 Getter.
virtual KockpitUser * getKockpitUser (caller cal=APP) const
 Getter.
virtual KockpitGroup * getKockpitGroup (caller cal=APP) const
 Getter.
const KockpitMap * getMap () const
 Getter.
void operator= (const KockpitUnitMap &kmap)
 Operator.

Private Member Functions

bool readFiles ()
 Read Files.

Private Attributes

KockpitUnit * kunit
 Base object to map.
KockpitMap * map
 Attribute mapper.
XMLMapReader * reader
 XMLMap reader to read attribute mappings.
QStringList mapfiles
 List of mapping files.

Friends

std::ostream & operator<< (std::ostream &output, const KockpitUnitMap &kumap)
 Output.

Detailed Description

Class for attribute mapping.

This class is needed to encapsulate a KockpitMap and the associated KockpitUnit. This class manages the user defined mappings by reading in the XML mapping files.


Constructor & Destructor Documentation

KockpitUnitMap::KockpitUnitMap (  )  [inline]

Standard constructor.

KockpitUnitMap::KockpitUnitMap ( KockpitUser *  kuser,
const QStringList &  mapfiles,
QObject *  parent = 0 
)

Constructor.

Creates a mapping for a KockpitUser object.

Parameters:
kuser Object which should be used as mapping base.
mapfiles Files which configure the mappings.
parent Parent object.
KockpitUnitMap::KockpitUnitMap ( KockpitGroup *  kgrp,
const QStringList &  mapfiles,
QObject *  parent = 0 
)

Constructor.

Creates a mapping for a KockpitGroup object.

Parameters:
kgrp Object which should be used as mapping base.
mapfiles Files which configure the mappings.
parent Parent object.
KockpitUnitMap::KockpitUnitMap ( const KockpitUnitMap &  kmap  ) 

Copy constructor.

Create a copy of an existing KockpitUnitMap object.

Parameters:
kmap The KockpitUnitMap which should be cloned.
KockpitUnitMap::~KockpitUnitMap (  )  [virtual]

Destructor.

kunit will not be destroyed - for this task, you must call the deleteKunit function. This object is not deleted because it is possible to have multiple KockpitUnitMaps for the same object


Member Function Documentation

void KockpitUnitMap::deleteKunit (  ) 

Delete Kunit.

This function is called in order to delete the object hanging on the kunit pointer.

KockpitGroup * KockpitUnitMap::getKockpitGroup ( caller  cal = APP  )  const [virtual]

Getter.

Takes kunit try to cast it to KockpitGroup pointer and returns it.

Parameters:
cal Caller - could be plugin or main application.
Returns:
KockpitGroup* Cast was successfull.
NULL Something went wrong.
KockpitUser * KockpitUnitMap::getKockpitUser ( caller  cal = APP  )  const [virtual]

Getter.

Takes kunit try to cast it to KockpitUser pointer and returns it.

Parameters:
cal Caller - could be plugin or main application.
Returns:
KockpitUser* Cast was successfull.
NULL Something went wrong.
KockpitUnit * KockpitUnitMap::getKunit (  )  const [virtual]

Getter.

Returns:
KockpitUnit* Pointer to kunit
const KockpitMap * KockpitUnitMap::getMap (  )  const

Getter.

Returns pointer to map.

Returns:
KockpitMap* Success.
NULL Something went wrong or map is not setted.
void KockpitUnitMap::operator= ( const KockpitUnitMap &  kmap  ) 

Operator.

Assign kmap attributes.

Parameters:
kmap Reference to KockpitUnitMap object.
bool KockpitUnitMap::readFiles (  )  [private]

Read Files.

This function reads each file specified in mapfiles.

Returns:
true Everything is okay.
false something went wrong.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  output,
const KockpitUnitMap &  kumap 
) [friend]

Output.

This function is only needed to give out the KockpitUnitMap on STDOUT.

Parameters:
output Reference to stdout.
kumap Reference to an KockpitUnitMap object.

Field Documentation

Base object to map.

Attribute mapper.

QStringList KockpitUnitMap::mapfiles [private]

List of mapping files.

XMLMap reader to read attribute mappings.


The documentation for this class was generated from the following files:
Generated on Wed Mar 24 09:58:14 2010 for kockpit by  doxygen 1.6.3