Antkeeper  0.0.1
Public Member Functions | Public Attributes | List of all members
ant_gene< T > Struct Template Reference

Ant gene with caste-specific phenes. More...

#include <ant-gene.hpp>

Inheritance diagram for ant_gene< T >:
ant_gene_base

Public Member Functions

constexpr ant_gene_type type () const noexcept override
 Returns the ant gene type. More...
 

Public Attributes

std::vector< T > phenes
 Phene definitions. More...
 
std::unordered_map< ant_caste_type, T * > phene_map
 Map of ant caste types to phenes. More...
 
- Public Attributes inherited from ant_gene_base
hash::fnv1a32_t name
 32-bit FNV-1a hash of gene name. More...
 

Detailed Description

template<class T>
struct ant_gene< T >

Ant gene with caste-specific phenes.

Template Parameters
TAnt phene type.
See also
https://en.wikipedia.org/wiki/Polyphenism

Definition at line 49 of file ant-gene.hpp.

Member Function Documentation

◆ type()

constexpr ant_gene_type ant_wings_gene::type ( ) const
inlineconstexproverridevirtualnoexcept

Returns the ant gene type.

Implements ant_gene_base.

Definition at line 65 of file ant-antennae-gene.hpp.

Member Data Documentation

◆ phene_map

template<class T >
std::unordered_map<ant_caste_type, T*> ant_gene< T >::phene_map

Map of ant caste types to phenes.

Definition at line 57 of file ant-gene.hpp.

◆ phenes

template<class T >
std::vector<T> ant_gene< T >::phenes

Phene definitions.

Definition at line 54 of file ant-gene.hpp.


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