Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.80 KB | None | 0 0
  1. struct ManagerGuiResult
  2.         {
  3.             enum ManagerResultType
  4.             {
  5.                 RESULT_UNKNOWN = -1,
  6.                 RESULT_COLOR_PLY = 0,
  7.                 RESULT_HEATMAP_PLY = 1,
  8.             };
  9.  
  10.             struct GUIDefect
  11.             {
  12.                 std::vector<float> locationMM;
  13.                 float radiusMM;
  14.                 std::string name;
  15.  
  16.                 friend aquifi::networking::NetworkBuffer& operator<<(aquifi::networking::NetworkBuffer& stream, const GUIDefect & t)
  17.                 {
  18.                     stream << t.locationMM << t.radiusMM << t.name;
  19.                     return stream;
  20.                 }
  21.  
  22.                 //! DeSerialization
  23.                 friend aquifi::networking::NetworkBuffer& operator>>(aquifi::networking::NetworkBuffer& stream, GUIDefect & t)
  24.                 {
  25.                     stream >> t.locationMM >> t.radiusMM >> t.name;
  26.                     return stream;
  27.                 }
  28.             };
  29.  
  30.             //! The session name.
  31.             std::string sessionName = "Undefined";
  32.  
  33.             //! Identifier to describe the group of camers used to obtain this result
  34.             std::string cameraGroup = "Undefined";
  35.  
  36.             //! the item type
  37.             std::string itemType = "Unknown";
  38.  
  39.             //! final status (accept/reject)
  40.             std::string resultStatus = "";
  41.  
  42.             std::vector<GUIDefect> defects;
  43.  
  44.             ManagerResultType resultType = RESULT_UNKNOWN;
  45.  
  46.             //! The ply location.
  47.             std::string path = "";
  48.  
  49.             //! Serialization
  50.             friend aquifi::networking::NetworkBuffer& operator<<(aquifi::networking::NetworkBuffer& stream, const ManagerGuiResult & t)
  51.             {
  52.                 stream << t.sessionName << t.cameraGroup << t.resultType << t.path << t.itemType << t.resultStatus << t.defects;
  53.                 return stream;
  54.             }
  55.  
  56.             //! DeSerialization
  57.             friend aquifi::networking::NetworkBuffer& operator>>(aquifi::networking::NetworkBuffer& stream, ManagerGuiResult & t)
  58.             {
  59.                 stream >> t.sessionName >> t.cameraGroup >> t.resultType >> t.path >> t.itemType >> t.resultStatus;
  60.                 if (stream.getReadSize() > 0)
  61.                     stream >> t.defects;
  62.                 return stream;
  63.             }
  64.         };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement