Nemo  2.2.0
Public Member Functions | Protected Attributes
TraitFileHandler< TP > Class Template Reference

Template class for the trait's FileHandler. More...

#include <filehandler.h>

+ Inheritance diagram for TraitFileHandler< TP >:
+ Collaboration diagram for TraitFileHandler< TP >:

List of all members.

Public Member Functions

 TraitFileHandler (TP *trait_proto, const char *ext)
virtual ~TraitFileHandler ()
virtual void FHwrite ()=0
 Default behavior of the class, called by Handler::update().
virtual void FHread (string &filename)=0
 Default input function.
virtual void set (bool rpl_per, bool gen_per, int rpl_occ, int gen_occ, int rank, string path, TP *trait_proto)

Protected Attributes

TP * _FHLinkedTrait
int _FHLinkedTraitIndex

Detailed Description

template<class TP>
class TraitFileHandler< TP >

Template class for the trait's FileHandler.

Constructor links to a given trait prototype. The pointer and index of the trait prototype are stored in the class. They can be accessd through the _FHLinkedTrait and _FHLinkedTraitIndex members to get the stats.

Definition at line 195 of file filehandler.h.


Constructor & Destructor Documentation

template<class TP>
TraitFileHandler< TP >::TraitFileHandler ( TP *  trait_proto,
const char *  ext 
)

Definition at line 210 of file filehandler.h.

                                                                                           :
FileHandler(ext), _FHLinkedTrait(trait_proto), _FHLinkedTraitIndex(trait_proto->get_index())
{ }
template<class TP>
virtual TraitFileHandler< TP >::~TraitFileHandler ( ) [inline, virtual]

Definition at line 201 of file filehandler.h.

{}

Member Function Documentation

template<class TP>
virtual void TraitFileHandler< TP >::FHread ( string &  filename) [pure virtual]

Default input function.

Loads a pop from the genotypes read from the input file.

Implements FileHandler.

Implemented in TTDeletMutBitstrFH, TTQuantiFH, and TTNeutralGenesFH.

template<class TP>
virtual void TraitFileHandler< TP >::FHwrite ( ) [pure virtual]

Default behavior of the class, called by Handler::update().

Implements FileHandler.

Implemented in TTDeletMutBitstrFH, TTQuantiFH, and TTNeutralGenesFH.

template<class TP>
void TraitFileHandler< TP >::set ( bool  rpl_per,
bool  gen_per,
int  rpl_occ,
int  gen_occ,
int  rank,
string  path,
TP *  trait_proto 
) [virtual]

Definition at line 214 of file filehandler.h.

References FileHandler::set().

Referenced by TProtoNeutralGenes::loadFileServices(), and TProtoDeletMutations_bitstring::loadFileServices().

{
  FileHandler::set(rpl_per, gen_per, rpl_occ, gen_occ,rank, path);
  _FHLinkedTrait = trait_proto;
  _FHLinkedTraitIndex = trait_proto->get_index();
}

Member Data Documentation

template<class TP>
TP* TraitFileHandler< TP >::_FHLinkedTrait [protected]

Definition at line 197 of file filehandler.h.

template<class TP>
int TraitFileHandler< TP >::_FHLinkedTraitIndex [protected]

Definition at line 198 of file filehandler.h.


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

Generated for Nemo v2.2.0 by  doxygen 1.7.5.1 -- Nemo is hosted by  SourceForge.net Logo