Develop Biology
The language of life
bio::chemical::Axis Class Reference

#include <Axis.h>

+ Inheritance diagram for bio::chemical::Axis:
+ Collaboration diagram for bio::chemical::Axis:

Public Member Functions

 Axis ()
 
virtual ~Axis ()
 
virtual std::string Rotate (Symmetry *symmetry) const
 
- Public Member Functions inherited from bio::physical::Axis
 Axis ()
 
virtual ~Axis ()
 
virtual Symmetryoperator() (std::string encoded) const
 
virtual std::string operator| (Wave *particle) const
 
virtual SymmetryRotate (std::string) const
 
virtual std::string Rotate (Symmetry *symmetry) const
 

Additional Inherited Members

- Static Public Member Functions inherited from bio::physical::Axis
static std::string Failed ()
 
- Protected Member Functions inherited from bio::physical::Axis
virtual std::string Encode (Symmetry *symmetry) const
 

Detailed Description

chemical::Axes simplify the Axis definition process by leveraging the nested nature of chemical::Symmetry. All you need to do to make an Axis using chemical::Axis is define Encode(Symmetry*) and Rotate(std::string).

Definition at line 35 of file Axis.h.

Constructor & Destructor Documentation

◆ Axis()

bio::chemical::Axis::Axis ( )

Definition at line 29 of file Axis.cpp.

30{
31
32}

◆ ~Axis()

bio::chemical::Axis::~Axis ( )
virtual

Reimplemented from bio::physical::Axis.

Definition at line 34 of file Axis.cpp.

35{
36
37}

Member Function Documentation

◆ Rotate()

std::string bio::chemical::Axis::Rotate ( Symmetry symmetry) const
virtual

Express the given Symmetry into something intelligible by another system. Takes advantage of Encode and chemical::Symmetry to make defining Axes easier. You shouldn't have to override this from here on out. NOTE: this does not apply to Rotate(std::string); you'll still need to override that one.

Parameters
symmetry
Returns
text, possibly a command (like mysql), structured values (like json), an entire program (like python), etc. or Failed().

Definition at line 39 of file Axis.cpp.

40{
41 std::string ret = "";
42 ret += Encode(symmetry);
43 Container* toRotate = symmetry->GetAll< Symmetry* >();
44 for (
45 SmartIterator sym = toRotate->Begin();
46 !sym.IsAtEnd();
47 ++sym
48 )
49 {
50 ret += Rotate(sym.As< Symmetry* >());
51 }
52
53 return ret;
54}
virtual std::string Rotate(Symmetry *symmetry) const
Definition: Axis.cpp:39
virtual std::string Encode(Symmetry *symmetry) const
Definition: Axis.cpp:66

References bio::Container::Begin(), bio::physical::Axis::Encode(), bio::chemical::UnorderedStructureInterface::GetAll(), bio::SmartIterator::IsAtEnd(), and Rotate().

Referenced by Rotate().


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