MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Public Types | Public Member Functions | Static Public Member Functions
MFM::AbstractElement_Xtal< CC > Class Template Referenceabstract
Inheritance diagram for MFM::AbstractElement_Xtal< CC >:
MFM::Element< CC > MFM::Element_Xtal_General< CC > MFM::Element_Xtal_L12< CC > MFM::Element_Xtal_Sq1< CC > MFM::Element_Xtal_R12< CC >

Data Structures

struct  SiteSampler
 

Public Types

enum  { R = P::EVENT_WINDOW_RADIUS, SITES = EVENT_WINDOW_SITES(R), BITS = P::BITS_PER_ATOM, XTAL_FIRST_FREE_POS = P3Atom<P>::P3_STATE_BITS_POS }
 
typedef CC::ATOM_TYPE T
 
typedef CC::PARAM_CONFIG P
 
typedef BitVector< SITES > XtalSites
 

Public Member Functions

virtual void GetSites (T &atom, XtalSites &xites, EventWindow< CC > &window) const =0
 
virtual bool IsSameXtal (T &self, const T &otherAtom, EventWindow< CC > &window) const
 
virtual u32 GetSymI (T &atom, EventWindow< CC > &window) const =0
 
 AbstractElement_Xtal (const UUID &uuid)
 
virtual u32 Diffusability (EventWindow< CC > &ew, SPoint nowAt, SPoint maybeAt) const
 
virtual u32 PercentMovable (const T &you, const T &me, const SPoint &offset) const
 
bool IsAbstractXtalType (EventWindow< CC > &window, u32 type) const
 
virtual void Behavior (EventWindow< CC > &window) const
 
- Public Member Functions inherited from MFM::Element< CC >
 Element (const UUID &uuid)
 
void AllocateType ()
 
u32 GetType () const
 
const char * GetAtomicSymbol () const
 
const char * GetName () const
 
virtual void AppendDescription (const T *atom, OString64 &desc) const
 
bool IsType (u32 type) const
 
const UUIDGetUUID () const
 
virtual const T & GetDefaultAtom () const
 
virtual u32 PhysicsColor () const
 
virtual const char * GetDescription () const
 
virtual u32 DefaultPhysicsColor () const =0
 
virtual u32 DefaultLowlightColor () const
 
void ToggleLowlightPhysicsColor ()
 
virtual u32 LocalPhysicsColor (const T &atom, u32 selector) const
 
u32 NoDiffusability (EventWindow< CC > &ew, SPoint nowAt, SPoint maybeAt) const
 
const ElementParameters< CC > & GetElementParameters () const
 
ElementParameters< CC > & GetElementParameters ()
 
const AtomicParameters< CC > & GetAtomicParameters () const
 
AtomicParameters< CC > & GetAtomicParameters ()
 

Static Public Member Functions

static u32 GetIndex (const SPoint coord)
 
static bool ReadBit (const XtalSites &sites, const SPoint coord)
 
static void WriteBit (XtalSites &sites, const SPoint coord, bool val)
 

Additional Inherited Members

- Static Public Attributes inherited from MFM::Element< CC >
static const u32 COMPLETE_DIFFUSABILITY = 1000
 
- Protected Member Functions inherited from MFM::Element< CC >
virtual T BuildDefaultAtom () const
 
const BitVector
< P::BITS_PER_ATOM > & 
GetBits (const T &atom) const
 
BitVector< P::BITS_PER_ATOM > & GetBits (T &atom) const
 
bool IsValidAtomicSymbol (const char *symbol)
 
void SetAtomicSymbol (const char *symbol)
 
void SetName (const char *name)
 
void Diffuse (EventWindow< CC > &window) const
 

Member Function Documentation

template<class CC >
virtual void MFM::AbstractElement_Xtal< CC >::Behavior ( EventWindow< CC > &  window) const
inlinevirtual

Describes the behavior of this Element. This is invoked when an Atom of this Element is chosen as the center of an EventWindow for an Event, which is given as a parameter.

Parameters
windowThe EventWindow describing the Event which is currently being executed.

Implements MFM::Element< CC >.

template<class CC >
virtual u32 MFM::AbstractElement_Xtal< CC >::Diffusability ( EventWindow< CC > &  ew,
SPoint  nowAt,
SPoint  maybeAt 
) const
inlinevirtual

Xtals don't diffuse

Reimplemented from MFM::Element< CC >.

template<class CC >
virtual bool MFM::AbstractElement_Xtal< CC >::IsSameXtal ( T &  self,
const T &  otherAtom,
EventWindow< CC > &  window 
) const
inlinevirtual

Called when self and otherAtom are identical subtypes of AbstractElement_Xtal, to check if there are any additional details that might cause them to actually be different xtals. Given the types are already known identical, IsSameXtal returns true by default, but is overridden by, for example, Element_Xtal_General.

Reimplemented in MFM::Element_Xtal_General< CC >.

template<class CC >
virtual u32 MFM::AbstractElement_Xtal< CC >::PercentMovable ( const T &  you,
const T &  me,
const SPoint offset 
) const
inlinevirtual

Determines how likely an Atom of this type is to be swapped with during diffusal.

Returns
an integral percentage, from 0 to 100, describing the desire of an atom of this type to be moved; 0 being impossible to move and 100 being completely fine with moving.

Implements MFM::Element< CC >.


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