spacegroup.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GCU_SPACE_GROUP_H
00024 #define GCU_SPACE_GROUP_H
00025
00026 #include "macros.h"
00027 #include <string>
00028 #include <list>
00029
00030 namespace gcu
00031 {
00032
00033 class Transform3d;
00034 class Vector;
00035
00041 class SpaceGroup
00042 {
00043 public:
00044 SpaceGroup();
00045 ~SpaceGroup();
00046
00047 void AddTransform(const std::string &s);
00048
00049 std::list<Vector> Transform (Vector const &v) const;
00050
00051 Transform3d const *GetFirstTransform (std::list <Transform3d*>::const_iterator &i) const;
00052 Transform3d const *GetNextTransform (std::list <Transform3d*>::const_iterator &i) const;
00053
00054
00055
00056 static SpaceGroup const *GetSpaceGroup (char const *name);
00057 static SpaceGroup const *GetSpaceGroup (std::string const &name);
00058 static SpaceGroup const *GetSpaceGroup (unsigned id);
00059 static SpaceGroup const *Find (SpaceGroup* group);
00060
00061
00062 void RegisterSpaceGroup (int nb = 0, ...);
00063
00064 bool operator ==(const SpaceGroup &) const;
00065 int operator!=(const SpaceGroup &other) const
00066 {
00067 return !((*this) == other);
00068 }
00069 bool IsValid() const;
00070
00071 private:
00072 std::list<Transform3d*> m_Transforms;
00073
00074 GCU_PROP (std::string, HMName)
00075 GCU_PROP (std::string, HallName)
00076 GCU_PROP (unsigned, Id)
00077 };
00078
00079 }
00080
00081 #endif // GCU_SPACE_GROUP_H
00082