vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SectorManager.h
Go to the documentation of this file.
1 #pragma once
2 #include "Pattern.h"
3 #include "Hoop.h"
4 #include "SectorColorGen.h"
5 
6 namespace APDYNAMICART
7 {
8 
9 struct SectorInfo
10 {
14 
16  : sector(sector), pattern(pattern), hoop(hoop) {};
17 };
18 
20 
24 {
25 public:
27  {
28  static SectorManager manager;
29  return &manager;
30  }
31 
32  void addSector(SectorPtr sector, HoopPtr hoop);
33  void removeSector(unsigned int index);
34  void setDefaultPattern(PatternPtr pattern);
35  void removeAllSectorsOnHoop( HoopPtr hoop );
36 
38  SectorPtr getSector(unsigned int index);
39  HoopPtr getHoop(unsigned int index);
40  PatternPtr getPattern(unsigned int index);
41  unsigned int getNumSectors();
42 
44  typedef std::vector<SectorInfo> SectorInfoList;
47 
49  void load( HoopPtr hoop, int sectorsCount, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* PoANode );
50  void save( HoopPtr hoop, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* Document, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* poaNode );
51 
52 protected:
53  SectorManager(); //Protected constructor, so no one can create instance of this class
54  std::vector<SectorInfo> _sectorInfoList;
55  std::string _defaultPatternName;
56 };
57 }
58