You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

​
​
​
6 years ago
​
6 years ago
​
​
​
6 years ago
​
6 years ago
​
​
6 years ago
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __ARGUS_NODE_FACTORY_HEADER__
  2. #define __ARGUS_NODE_FACTORY_HEADER__
  3. #include <vector>
  4. #include <map>
  5. #include "rgooseNode.h"
  6. typedef std::vector<argusNetNode*> vectorNetNodes;
  7. typedef std::map<uint32_t,argusNetNode*> mapNode2Id;
  8. class argusNodeFactory{
  9. private:
  10. basicLogCollection * m_pLog;
  11. argusDBC * m_pDBC;
  12. uint32_t m_nSiteID;
  13. vectorNetNodes m_vNetNodes;
  14. mapNode2Id m_mNetNodesIDS;
  15. public:
  16. static argusNodeFactory * getInstance();
  17. virtual ~argusNodeFactory();
  18. argusNetNode * createNode( uint32_t id );
  19. void deleteNode( argusNetNode *ptr );
  20. void deleteNode( uint32_t id );
  21. uint32_t fetchNodes( ARGUS_NODE_TYPE type, argusNetNode **&RA );
  22. argusNetNode * getNode( uint32_t id );
  23. uint32_t getNodeCount( ARGUS_NODE_TYPE type );
  24. bool loadNodes( uint32_t SiteID = 0 );
  25. void validate( void );
  26. protected:
  27. argusNodeFactory();
  28. private:
  29. static argusNodeFactory * _instance;
  30. };
  31. #endif