Robot Raconteur Core C++ Library
ServiceDefinition.h
Go to the documentation of this file.
1 
24 #pragma once
25 
26 #include "RobotRaconteur/Message.h"
28 #include "RobotRaconteur/Error.h"
30 
31 #include <boost/tuple/tuple.hpp>
32 #include <boost/range/iterator_range.hpp>
33 #include <boost/algorithm/string.hpp>
34 #include <boost/lexical_cast.hpp>
35 
36 namespace RobotRaconteur
37 {
38 class ROBOTRACONTEUR_CORE_API ServiceEntryDefinition;
39 class ROBOTRACONTEUR_CORE_API MemberDefinition;
40 class ROBOTRACONTEUR_CORE_API FunctionDefinition;
41 class ROBOTRACONTEUR_CORE_API PropertyDefinition;
42 class ROBOTRACONTEUR_CORE_API EventDefinition;
43 class ROBOTRACONTEUR_CORE_API ObjRefDefinition;
44 class ROBOTRACONTEUR_CORE_API PipeDefinition;
45 class ROBOTRACONTEUR_CORE_API CallbackDefinition;
46 class ROBOTRACONTEUR_CORE_API WireDefinition;
47 class ROBOTRACONTEUR_CORE_API MemoryDefinition;
48 class ROBOTRACONTEUR_CORE_API TypeDefinition;
49 class ROBOTRACONTEUR_CORE_API ExceptionDefinition;
50 class ROBOTRACONTEUR_CORE_API UsingDefinition;
51 class ROBOTRACONTEUR_CORE_API ConstantDefinition;
52 class ROBOTRACONTEUR_CORE_API EnumDefinition;
53 class ROBOTRACONTEUR_CORE_API EnumDefinitionValue;
54 
55 class ROBOTRACONTEUR_CORE_API ServiceDefinitionParseException;
56 class ROBOTRACONTEUR_CORE_API ServiceDefinitionVerifyException;
57 
66 struct ROBOTRACONTEUR_CORE_API ServiceDefinitionParseInfo
67 {
69  std::string ServiceName;
71  std::string RobDefFilePath;
73  std::string Line;
75  int32_t LineNumber;
76 
80  void Reset();
81 };
82 
93 class ROBOTRACONTEUR_CORE_API RobotRaconteurVersion
94 {
95  public:
102 
111  RobotRaconteurVersion(uint32_t major, uint32_t minor, uint32_t patch = 0, uint32_t tweak = 0);
112 
122  RobotRaconteurVersion(boost::string_ref v);
123 
132  std::string ToString() const;
133 
145  void FromString(boost::string_ref v, const ServiceDefinitionParseInfo* parse_info = NULL);
146 
148  ROBOTRACONTEUR_CORE_API friend bool operator==(const RobotRaconteurVersion& v1, const RobotRaconteurVersion& v2);
150  ROBOTRACONTEUR_CORE_API friend bool operator!=(const RobotRaconteurVersion& v1, const RobotRaconteurVersion& v2);
152  ROBOTRACONTEUR_CORE_API friend bool operator>(const RobotRaconteurVersion& v1, const RobotRaconteurVersion& v2);
154  ROBOTRACONTEUR_CORE_API friend bool operator>=(const RobotRaconteurVersion& v1, const RobotRaconteurVersion& v2);
156  ROBOTRACONTEUR_CORE_API friend bool operator<(const RobotRaconteurVersion& v1, const RobotRaconteurVersion& v2);
158  ROBOTRACONTEUR_CORE_API friend bool operator<=(const RobotRaconteurVersion& v1, const RobotRaconteurVersion& v2);
159 
168  operator bool() const;
169 
171  uint32_t major;
173  uint32_t minor;
175  uint32_t patch;
177  uint32_t tweak;
178 
181 };
182 
190 class ROBOTRACONTEUR_CORE_API ServiceDefinitionParseException : public ServiceDefinitionException
191 {
192 
193  public:
196 
203  std::string ShortMessage;
204 
210  ServiceDefinitionParseException(const std::string& e);
211 
219 
227  virtual std::string ToString() const;
228 
229  RR_OVIRTUAL const char* what() const throw() RR_OVERRIDE;
230 
231  RR_OVIRTUAL ~ServiceDefinitionParseException() throw() RR_OVERRIDE {}
232 
233  private:
234  std::string what_store;
235 };
236 
244 class ROBOTRACONTEUR_CORE_API ServiceDefinitionVerifyException : public ServiceDefinitionException
245 {
246 
247  public:
250 
257  std::string ShortMessage;
258 
264  ServiceDefinitionVerifyException(const std::string& e);
265 
273 
281  virtual std::string ToString() const;
282 
283  RR_OVIRTUAL const char* what() const throw() RR_OVERRIDE;
284 
285  RR_OVIRTUAL ~ServiceDefinitionVerifyException() throw() RR_OVERRIDE {}
286 
287  private:
288  std::string what_store;
289 };
290 
302 class ROBOTRACONTEUR_CORE_API ServiceDefinition : public RR_ENABLE_SHARED_FROM_THIS<ServiceDefinition>
303 {
304  public:
306  std::string Name;
307 
309  std::vector<RR_SHARED_PTR<ServiceEntryDefinition> > Structures;
311  std::vector<RR_SHARED_PTR<ServiceEntryDefinition> > Pods;
313  std::vector<RR_SHARED_PTR<ServiceEntryDefinition> > NamedArrays;
315  std::vector<RR_SHARED_PTR<ServiceEntryDefinition> > Objects;
316 
318  std::vector<std::string> Options;
319 
321  std::vector<std::string> Imports;
322 
324  std::vector<RR_SHARED_PTR<UsingDefinition> > Using;
325 
327  std::vector<RR_SHARED_PTR<ExceptionDefinition> > Exceptions;
328 
330  std::vector<RR_SHARED_PTR<ConstantDefinition> > Constants;
331 
333  std::vector<RR_SHARED_PTR<EnumDefinition> > Enums;
334 
337 
344 
349  std::string DocString;
350 
351  virtual ~ServiceDefinition() {}
352 
360  virtual std::string ToString();
361 
373  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
374 
388  void FromString(boost::string_ref s, std::vector<ServiceDefinitionParseException>& warnings,
389  const ServiceDefinitionParseInfo* parse_info = NULL);
390 
398  virtual void ToStream(std::ostream& os) const;
399 
411  void FromStream(std::istream& is, const ServiceDefinitionParseInfo* parse_info = NULL);
412 
426  void FromStream(std::istream& is, std::vector<ServiceDefinitionParseException>& warnings,
427  const ServiceDefinitionParseInfo* parse_info = NULL);
428 
439 
447 
452  void Reset();
453 };
454 
462 class ROBOTRACONTEUR_CORE_API NamedTypeDefinition
463 {
464  public:
466  std::string Name;
468  virtual DataTypes RRDataType() const = 0;
481  virtual std::string ResolveQualifiedName() = 0;
482  virtual ~NamedTypeDefinition() {}
483 };
484 
498 class ROBOTRACONTEUR_CORE_API ServiceEntryDefinition : public RR_ENABLE_SHARED_FROM_THIS<ServiceEntryDefinition>,
499  public NamedTypeDefinition
500 {
501  public:
511  std::vector<RR_SHARED_PTR<MemberDefinition> > Members;
512 
521 
527  std::vector<std::string> Implements;
528 
530  std::vector<std::string> Options;
531 
533  std::vector<RR_SHARED_PTR<ConstantDefinition> > Constants;
534 
541 
546  std::string DocString;
547 
555  ServiceEntryDefinition(const RR_SHARED_PTR<ServiceDefinition>& def);
556 
557  RR_OVIRTUAL ~ServiceEntryDefinition() RR_OVERRIDE {}
558 
566  virtual std::string ToString();
567 
575  virtual void ToStream(std::ostream& os) const;
576 
587  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
588 
600  void FromString(boost::string_ref s, std::vector<ServiceDefinitionParseException>& warnings,
601  const ServiceDefinitionParseInfo* parse_info = NULL);
602 
613  void FromStream(std::istream& is, const ServiceDefinitionParseInfo* parse_info = NULL);
614 
626  void FromStream(std::istream& is, std::vector<ServiceDefinitionParseException>& warnings,
627  const ServiceDefinitionParseInfo* parse_info = NULL);
628 
634  RR_WEAK_PTR<ServiceDefinition> ServiceDefinition_;
635 
640  void Reset();
641 
642  RR_OVIRTUAL DataTypes RRDataType() const RR_OVERRIDE;
643  RR_OVIRTUAL std::string ResolveQualifiedName() RR_OVERRIDE;
644 };
645 
653 class ROBOTRACONTEUR_CORE_API MemberDefinition : public RR_ENABLE_SHARED_FROM_THIS<MemberDefinition>
654 {
655  public:
657  std::string Name;
664  RR_WEAK_PTR<ServiceEntryDefinition> ServiceEntry;
665 
673  std::vector<std::string> Modifiers;
674 
681 
686  std::string DocString;
687 
688  MemberDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
689 
702 
703  virtual ~MemberDefinition() {}
704 
712  virtual std::string ToString() { return ""; }
713 
715  virtual void Reset();
716 };
717 
727 class ROBOTRACONTEUR_CORE_API PropertyDefinition : public MemberDefinition
728 {
729  public:
731  RR_SHARED_PTR<TypeDefinition> Type;
732 
740  PropertyDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
741 
742  RR_OVIRTUAL ~PropertyDefinition() RR_OVERRIDE {}
743 
749  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
750 
760  std::string ToString(bool isstruct) const;
761 
768  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
769 
774  RR_OVIRTUAL void Reset() RR_OVERRIDE;
775 
788 };
789 
799 class ROBOTRACONTEUR_CORE_API FunctionDefinition : public MemberDefinition
800 {
801  public:
803  RR_SHARED_PTR<TypeDefinition> ReturnType;
805  std::vector<RR_SHARED_PTR<TypeDefinition> > Parameters;
806 
814  FunctionDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
815 
816  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
817 
824  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
825 
830  RR_OVIRTUAL void Reset() RR_OVERRIDE;
831 
842  bool IsGenerator();
843 };
844 
854 class ROBOTRACONTEUR_CORE_API EventDefinition : public MemberDefinition
855 {
856  public:
858  std::vector<RR_SHARED_PTR<TypeDefinition> > Parameters;
859 
867  EventDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
868 
869  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
870 
877  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
878 
883  RR_OVIRTUAL void Reset() RR_OVERRIDE;
884 };
885 
895 class ROBOTRACONTEUR_CORE_API ObjRefDefinition : public MemberDefinition
896 {
897  public:
903  std::string ObjectType;
904 
914 
924 
932  ObjRefDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
933 
934  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
935 
942  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
943 
948  RR_OVIRTUAL void Reset() RR_OVERRIDE;
949 };
950 
960 class ROBOTRACONTEUR_CORE_API PipeDefinition : public MemberDefinition
961 {
962  public:
964  RR_SHARED_PTR<TypeDefinition> Type;
965 
973  PipeDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
974 
975  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
976 
983  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
984 
989  RR_OVIRTUAL void Reset() RR_OVERRIDE;
990 
1000  MemberDefinition_Direction Direction() const;
1001 
1012  bool IsUnreliable() const;
1013 };
1014 
1024 class ROBOTRACONTEUR_CORE_API CallbackDefinition : public MemberDefinition
1025 {
1026  public:
1027  RR_OVIRTUAL ~CallbackDefinition() RR_OVERRIDE {}
1028 
1030  RR_SHARED_PTR<TypeDefinition> ReturnType;
1032  std::vector<RR_SHARED_PTR<TypeDefinition> > Parameters;
1033 
1041  CallbackDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
1042 
1043  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
1044 
1051  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1052 
1057  RR_OVIRTUAL void Reset() RR_OVERRIDE;
1058 };
1059 
1069 class ROBOTRACONTEUR_CORE_API WireDefinition : public MemberDefinition
1070 {
1071  public:
1073  RR_SHARED_PTR<TypeDefinition> Type;
1074 
1082  WireDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
1083 
1084  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
1085 
1092  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1093 
1098  RR_OVIRTUAL void Reset() RR_OVERRIDE;
1099 
1110 };
1111 
1121 class ROBOTRACONTEUR_CORE_API MemoryDefinition : public MemberDefinition
1122 {
1123  public:
1125  RR_SHARED_PTR<TypeDefinition> Type;
1126 
1134  MemoryDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& ServiceEntry);
1135 
1136  RR_OVIRTUAL std::string ToString() RR_OVERRIDE;
1137 
1144  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1145 
1150  RR_OVIRTUAL void Reset() RR_OVERRIDE;
1151 
1162 };
1163 
1169 class ROBOTRACONTEUR_CORE_API TypeDefinition
1170 {
1171  public:
1172  virtual ~TypeDefinition() {}
1173 
1179  std::string Name;
1180 
1184  std::string TypeString;
1185 
1191  std::vector<int32_t> ArrayLength;
1192 
1195 
1197  RR_WEAK_PTR<MemberDefinition> member;
1198 
1201 
1207 
1213  TypeDefinition(const RR_SHARED_PTR<MemberDefinition>& member);
1214 
1220  virtual std::string ToString();
1221 
1228  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1229 
1241  static DataTypes DataTypeFromString(boost::string_ref d);
1242 
1249  static std::string StringFromDataType(DataTypes d);
1250 
1255  void Reset();
1256 
1262  void CopyTo(TypeDefinition& def) const;
1263 
1269  RR_SHARED_PTR<TypeDefinition> Clone() const;
1270 
1278  void Rename(boost::string_ref name);
1279 
1287 
1294  void RemoveArray();
1295 
1305 
1315 
1338  RR_SHARED_PTR<NamedTypeDefinition> ResolveNamedType(
1339  const std::vector<RR_SHARED_PTR<ServiceDefinition> >& other_defs =
1340  std::vector<RR_SHARED_PTR<ServiceDefinition> >(),
1341  const RR_SHARED_PTR<RobotRaconteurNode>& node = RR_SHARED_PTR<RobotRaconteurNode>(),
1342  const RR_SHARED_PTR<RRObject>& client = RR_SHARED_PTR<RRObject>());
1343 
1344  // Don't modify directly, use ResolveNamedType. Left public for specalized use.
1345  RR_WEAK_PTR<NamedTypeDefinition> ResolveNamedType_cache;
1346 };
1347 
1353 class ROBOTRACONTEUR_CORE_API ExceptionDefinition
1354 {
1355  public:
1356  virtual ~ExceptionDefinition();
1357 
1359  std::string Name;
1361  std::string DocString;
1362 
1364  RR_WEAK_PTR<ServiceDefinition> service;
1365 
1372 
1380  ExceptionDefinition(const RR_SHARED_PTR<ServiceDefinition>& service);
1381 
1387  std::string ToString();
1388 
1395  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1396 
1401  void Reset();
1402 };
1403 
1409 class ROBOTRACONTEUR_CORE_API UsingDefinition
1410 {
1411  public:
1412  virtual ~UsingDefinition();
1413 
1415  std::string QualifiedName;
1417  std::string UnqualifiedName;
1418 
1420  RR_WEAK_PTR<ServiceDefinition> service;
1421 
1428 
1436  UsingDefinition(const RR_SHARED_PTR<ServiceDefinition>& service);
1437 
1443  std::string ToString();
1444 
1451  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1452 };
1453 
1459 struct ROBOTRACONTEUR_CORE_API ConstantDefinition_StructField
1460 {
1462  std::string Name;
1464  std::string ConstantRefName;
1465 };
1466 
1472 class ROBOTRACONTEUR_CORE_API ConstantDefinition
1473 {
1474  public:
1475  virtual ~ConstantDefinition();
1476 
1478  std::string Name;
1479 
1481  RR_SHARED_PTR<TypeDefinition> Type;
1482 
1484  std::string Value;
1485 
1487  std::string DocString;
1488 
1494  RR_WEAK_PTR<ServiceDefinition> service;
1500  RR_WEAK_PTR<ServiceEntryDefinition> service_entry;
1501 
1508 
1516  ConstantDefinition(const RR_SHARED_PTR<ServiceDefinition>& service);
1517 
1525  ConstantDefinition(const RR_SHARED_PTR<ServiceEntryDefinition>& service_entry);
1526 
1532  std::string ToString();
1533 
1540  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1541 
1546  void Reset();
1547 
1556  static bool VerifyTypeAndValue(TypeDefinition& t, boost::string_ref value);
1557 
1564  bool VerifyValue() const;
1565 
1572  template <typename T>
1573  T ValueToScalar() const
1574  {
1575  T v;
1576  if (!detail::try_convert_string_to_number(boost::trim_copy(Value), v))
1577  {
1578  throw ServiceDefinitionParseException("Invalid constant", ParseInfo);
1579  }
1580  return v;
1581  }
1582 
1589  template <typename T>
1590  RR_INTRUSIVE_PTR<RRArray<T> > ValueToArray() const
1591  {
1592  boost::iterator_range<std::string::const_iterator> value1(Value);
1593  value1 = boost::trim_copy_if(value1, boost::is_any_of(" \t{}"));
1594  value1 = boost::trim_copy(value1);
1595  if (value1.empty())
1596  return AllocateRRArray<T>(0);
1597 
1598  size_t n = 0;
1599 
1600  // Count number of elements
1601  typedef boost::split_iterator<std::string::const_iterator> string_split_iterator;
1602  for (string_split_iterator e = boost::make_split_iterator(
1603  value1, boost::token_finder(boost::is_any_of(","), boost::token_compress_on));
1604  e != string_split_iterator(); e++)
1605  {
1606  n++;
1607  }
1608 
1609  RR_INTRUSIVE_PTR<RRArray<T> > o = AllocateRRArray<T>(n);
1610 
1611  size_t i = 0;
1612 
1613  // Read elements
1614  typedef boost::split_iterator<std::string::const_iterator> string_split_iterator;
1615  for (string_split_iterator e = boost::make_split_iterator(
1616  value1, boost::token_finder(boost::is_any_of(","), boost::token_compress_on));
1617  e != string_split_iterator(); e++)
1618  {
1619  if (!detail::try_convert_string_to_number(boost::trim_copy(*e), (*o)[i]))
1620  {
1621  throw ServiceDefinitionParseException("Invalid constant", ParseInfo);
1622  }
1623  i++;
1624  }
1625 
1626  if (i != n)
1627  throw InternalErrorException("Internal error");
1628  return o;
1629  }
1630 
1636  std::string ValueToString();
1637 
1643  std::vector<ConstantDefinition_StructField> ValueToStructFields() const;
1644 
1645  static std::string UnescapeString(boost::string_ref in);
1646  static std::string EscapeString(boost::string_ref in);
1647 };
1648 
1654 class ROBOTRACONTEUR_CORE_API EnumDefinition : public NamedTypeDefinition
1655 {
1656  public:
1657  RR_OVIRTUAL ~EnumDefinition() RR_OVERRIDE;
1658 
1660  std::vector<EnumDefinitionValue> Values;
1661 
1663  RR_WEAK_PTR<ServiceDefinition> service;
1664 
1671 
1673  std::string DocString;
1674 
1682  EnumDefinition(const RR_SHARED_PTR<ServiceDefinition>& service);
1683 
1689  std::string ToString();
1690 
1697  void FromString(boost::string_ref s, const ServiceDefinitionParseInfo* parse_info = NULL);
1698 
1705  bool VerifyValues() const;
1706 
1711  void Reset();
1712 
1713  RR_OVIRTUAL DataTypes RRDataType() const RR_OVERRIDE;
1714  RR_OVIRTUAL std::string ResolveQualifiedName() RR_OVERRIDE;
1715 };
1716 
1722 class ROBOTRACONTEUR_CORE_API EnumDefinitionValue
1723 {
1724  public:
1732 
1734  std::string Name;
1736  int32_t Value;
1740  bool HexValue;
1741 
1743  std::string DocString;
1744 };
1745 
1758 ROBOTRACONTEUR_CORE_API void VerifyServiceDefinitions(const std::vector<RR_SHARED_PTR<ServiceDefinition> >& def,
1759  std::vector<ServiceDefinitionParseException>& warnings);
1760 
1774 ROBOTRACONTEUR_CORE_API void VerifyServiceDefinitions(const std::vector<RR_SHARED_PTR<ServiceDefinition> >& def);
1775 
1784 ROBOTRACONTEUR_CORE_API bool CompareServiceDefinitions(const RR_SHARED_PTR<ServiceDefinition>& def1,
1785  const RR_SHARED_PTR<ServiceDefinition>& def2);
1786 
1796 ROBOTRACONTEUR_CORE_API boost::tuple<boost::string_ref, boost::string_ref> SplitQualifiedName(boost::string_ref name);
1797 
1806 template <typename T>
1807 RR_SHARED_PTR<T> TryFindByName(const std::vector<RR_SHARED_PTR<T> >& v, boost::string_ref name)
1808 {
1809  for (typename std::vector<RR_SHARED_PTR<T> >::const_iterator e = v.begin(); e != v.end(); ++e)
1810  {
1811  const RR_SHARED_PTR<T>& ee = *e;
1812  if (ee)
1813  {
1814  if (ee->Name == name)
1815  {
1816  return ee;
1817  }
1818  }
1819  }
1820 
1821  return RR_SHARED_PTR<T>();
1822 }
1823 
1824 ROBOTRACONTEUR_CORE_API size_t EstimatePodPackedElementSize(
1825  const RR_SHARED_PTR<ServiceEntryDefinition>& def,
1826  const std::vector<RR_SHARED_PTR<ServiceDefinition> >& other_defs = std::vector<RR_SHARED_PTR<ServiceDefinition> >(),
1827  const RR_SHARED_PTR<RobotRaconteurNode>& node = RR_SHARED_PTR<RobotRaconteurNode>(),
1828  const RR_SHARED_PTR<RRObject>& client = RR_SHARED_PTR<RRObject>());
1829 
1830 ROBOTRACONTEUR_CORE_API boost::tuple<DataTypes, size_t> GetNamedArrayElementTypeAndCount(
1831  const RR_SHARED_PTR<ServiceEntryDefinition>& def,
1832  const std::vector<RR_SHARED_PTR<ServiceDefinition> >& other_defs = std::vector<RR_SHARED_PTR<ServiceDefinition> >(),
1833  const RR_SHARED_PTR<RobotRaconteurNode>& node = RR_SHARED_PTR<RobotRaconteurNode>(),
1834  const RR_SHARED_PTR<RRObject>& client = RR_SHARED_PTR<RRObject>());
1835 
1836 #ifndef ROBOTRACONTEUR_NO_CXX11_TEMPLATE_ALIASES
1838 using ServiceDefinitionPtr = RR_SHARED_PTR<ServiceDefinition>;
1840 using NamedTypeDefinitionPtr = RR_SHARED_PTR<NamedTypeDefinition>;
1842 using ServiceEntryDefinitionPtr = RR_SHARED_PTR<ServiceEntryDefinition>;
1844 using MemberDefinitionPtr = RR_SHARED_PTR<MemberDefinition>;
1846 using FunctionDefinitionPtr = RR_SHARED_PTR<FunctionDefinition>;
1848 using PropertyDefinitionPtr = RR_SHARED_PTR<PropertyDefinition>;
1850 using EventDefinitionPtr = RR_SHARED_PTR<EventDefinition>;
1852 using ObjRefDefinitionPtr = RR_SHARED_PTR<ObjRefDefinition>;
1854 using PipeDefinitionPtr = RR_SHARED_PTR<PipeDefinition>;
1856 using CallbackDefinitionPtr = RR_SHARED_PTR<CallbackDefinition>;
1858 using WireDefinitionPtr = RR_SHARED_PTR<WireDefinition>;
1860 using MemoryDefinitionPtr = RR_SHARED_PTR<MemoryDefinition>;
1862 using TypeDefinitionPtr = RR_SHARED_PTR<TypeDefinition>;
1864 using UsingDefinitionPtr = RR_SHARED_PTR<UsingDefinition>;
1866 using EnumDefinitionPtr = RR_SHARED_PTR<EnumDefinition>;
1868 using ConstantDefinitionPtr = RR_SHARED_PTR<ConstantDefinition>;
1869 #endif
1870 
1871 } // namespace RobotRaconteur
MemberDefinition_NoLock
Member locking options enum.
Definition: RobotRaconteurConstants.h:550
DataTypes_ContainerTypes
Container type enum for TypeDefinition parser class.
Definition: RobotRaconteurConstants.h:126
MemberDefinition_Direction
Member direction enum.
Definition: RobotRaconteurConstants.h:534
DataTypes
Type codes for types supported by Robot Raconteur.
Definition: RobotRaconteurConstants.h:41
DataTypes_ArrayTypes
Array type enum for TypeDefinition parser class.
Definition: RobotRaconteurConstants.h:112
bool CompareServiceDefinitions(const boost::shared_ptr< ServiceDefinition > &def1, const boost::shared_ptr< ServiceDefinition > &def2)
Compare two service definitions to see if they are identical.
boost::shared_ptr< CallbackDefinition > CallbackDefinitionPtr
Convenience alias for CallbackDefinition shared_ptr.
Definition: ServiceDefinition.h:1856
boost::shared_ptr< ConstantDefinition > ConstantDefinitionPtr
Convenience alias for ConstantDefinition shared_ptr.
Definition: ServiceDefinition.h:1868
boost::shared_ptr< ServiceEntryDefinition > ServiceEntryDefinitionPtr
Convenience alias for ServiceEntryDefinition shared_ptr.
Definition: ServiceDefinition.h:1842
boost::shared_ptr< FunctionDefinition > FunctionDefinitionPtr
Convenience alias for FunctionDefinition shared_ptr.
Definition: ServiceDefinition.h:1846
boost::shared_ptr< WireDefinition > WireDefinitionPtr
Convenience alias for WireDefinition shared_ptr.
Definition: ServiceDefinition.h:1858
void VerifyServiceDefinitions(const std::vector< boost::shared_ptr< ServiceDefinition > > &def, std::vector< ServiceDefinitionParseException > &warnings)
Verify that service definitions are valid.
boost::shared_ptr< PipeDefinition > PipeDefinitionPtr
Convenience alias for PipeDefinition shared_ptr.
Definition: ServiceDefinition.h:1854
boost::shared_ptr< UsingDefinition > UsingDefinitionPtr
Convenience alias for UsingDefinition shared_ptr.
Definition: ServiceDefinition.h:1864
boost::shared_ptr< T > TryFindByName(const std::vector< boost::shared_ptr< T > > &v, boost::string_ref name)
Try finding a vector element by the Name field.
Definition: ServiceDefinition.h:1807
boost::shared_ptr< MemoryDefinition > MemoryDefinitionPtr
Convenience alias for MemoryDefinition shared_ptr.
Definition: ServiceDefinition.h:1860
boost::shared_ptr< ServiceDefinition > ServiceDefinitionPtr
Convenience alias for ServiceDefinition shared_ptr.
Definition: ServiceDefinition.h:1838
boost::shared_ptr< PropertyDefinition > PropertyDefinitionPtr
Convenience alias for PropertyDefinition shared_ptr.
Definition: ServiceDefinition.h:1848
boost::shared_ptr< EventDefinition > EventDefinitionPtr
Convenience alias for EventDefinition shared_ptr.
Definition: ServiceDefinition.h:1850
boost::tuple< boost::string_ref, boost::string_ref > SplitQualifiedName(boost::string_ref name)
Split a qualified name into its service definition name and unqualified name parts.
boost::shared_ptr< EnumDefinition > EnumDefinitionPtr
Convenience alias for EnumDefinition shared_ptr.
Definition: ServiceDefinition.h:1866
boost::shared_ptr< TypeDefinition > TypeDefinitionPtr
Convenience alias for TypeDefinition shared_ptr.
Definition: ServiceDefinition.h:1862
boost::shared_ptr< NamedTypeDefinition > NamedTypeDefinitionPtr
Convenience alias for NamedTypeDefinition shared_ptr.
Definition: ServiceDefinition.h:1840
boost::shared_ptr< ObjRefDefinition > ObjRefDefinitionPtr
Convenience alias for ObjRefDefinition shared_ptr.
Definition: ServiceDefinition.h:1852
boost::shared_ptr< MemberDefinition > MemberDefinitionPtr
Convenience alias for memberDefinition shared_ptr.
Definition: ServiceDefinition.h:1844
Class for callback member definitions.
Definition: ServiceDefinition.h:1025
CallbackDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty CallbackDefinition object.
std::vector< boost::shared_ptr< TypeDefinition > > Parameters
The parameter types and names of the callback.
Definition: ServiceDefinition.h:1032
boost::shared_ptr< TypeDefinition > ReturnType
The return type of the callback. May be void.
Definition: ServiceDefinition.h:1030
Class for constant definitions.
Definition: ServiceDefinition.h:1473
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a constant definition from string.
bool VerifyValue() const
Verify that this constant definition has a valid value.
T ValueToScalar() const
Convert the constant value to a numeric scalar.
Definition: ServiceDefinition.h:1573
boost::intrusive_ptr< RRArray< T > > ValueToArray() const
Convert the constant scalar to a numeric primitive array.
Definition: ServiceDefinition.h:1590
std::vector< ConstantDefinition_StructField > ValueToStructFields() const
Convert the constant value to structure fields.
RR_WEAK_PTR< ServiceEntryDefinition > service_entry
The parent service entry.
Definition: ServiceDefinition.h:1500
ConstantDefinition(const boost::shared_ptr< ServiceEntryDefinition > &service_entry)
Construct a new ConstantDefinition with a parent ServiceEntryDefinition.
std::string ValueToString()
Convert the constant value to string.
std::string Name
The name of the constant.
Definition: ServiceDefinition.h:1478
std::string Value
The value of the constant, as a string.
Definition: ServiceDefinition.h:1484
static bool VerifyTypeAndValue(TypeDefinition &t, boost::string_ref value)
Verify that the specified constant type and value are valid.
std::string DocString
Documentation string for the constant.
Definition: ServiceDefinition.h:1487
boost::shared_ptr< TypeDefinition > Type
The value type of the constant.
Definition: ServiceDefinition.h:1481
RR_WEAK_PTR< ServiceDefinition > service
The parent service definition.
Definition: ServiceDefinition.h:1494
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:1507
void Reset()
Clear all fields.
ConstantDefinition(const boost::shared_ptr< ServiceDefinition > &service)
Construct a new ConstantDefinition with a parent ServiceDefinition.
std::string ToString()
Convert constant definition to string.
Class for enum definitions.
Definition: ServiceDefinition.h:1655
bool VerifyValues() const
Verify that enum values are valid.
std::string ToString()
Convert enum definition to string.
std::string DocString
Documentation string for the enum.
Definition: ServiceDefinition.h:1673
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:1670
void Reset()
Clear all fields.
std::vector< EnumDefinitionValue > Values
The values in the enum.
Definition: ServiceDefinition.h:1660
RR_WEAK_PTR< ServiceDefinition > service
The parent service definition.
Definition: ServiceDefinition.h:1663
EnumDefinition(const boost::shared_ptr< ServiceDefinition > &service)
Construct a new empty EnumDefinition with a parent ServiceDefinition.
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse an enum definition from string.
Class representing an enum definition value.
Definition: ServiceDefinition.h:1723
EnumDefinitionValue()
Construct a new EnumDefinitionValue.
int32_t Value
The numeric value of the enum value.
Definition: ServiceDefinition.h:1736
std::string DocString
Documentations tring for the enum value.
Definition: ServiceDefinition.h:1743
bool HexValue
Value is represented using a hex literal.
Definition: ServiceDefinition.h:1740
bool ImplicitValue
If true, the enum value is implicitly incremented by 1 from the previous value.
Definition: ServiceDefinition.h:1738
std::string Name
The name of the enum value.
Definition: ServiceDefinition.h:1734
Class for event member definitions.
Definition: ServiceDefinition.h:855
EventDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty EventDefinition object.
std::vector< boost::shared_ptr< TypeDefinition > > Parameters
The parameter types and names of the event.
Definition: ServiceDefinition.h:858
Class for exception definitions.
Definition: ServiceDefinition.h:1354
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:1371
std::string ToString()
Convert exception definition to string.
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse an exception definition from string.
std::string Name
The name of the exception.
Definition: ServiceDefinition.h:1359
void Reset()
Clear all fields.
ExceptionDefinition(const boost::shared_ptr< ServiceDefinition > &service)
Construct a new empty ExceptionDefinition object.
RR_WEAK_PTR< ServiceDefinition > service
The parent service definition.
Definition: ServiceDefinition.h:1364
std::string DocString
Documentation string for the exception.
Definition: ServiceDefinition.h:1361
Class for function member definitions.
Definition: ServiceDefinition.h:800
std::vector< boost::shared_ptr< TypeDefinition > > Parameters
The parameter types and names of the function.
Definition: ServiceDefinition.h:805
FunctionDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty FunctionDefinition object.
boost::shared_ptr< TypeDefinition > ReturnType
The return type of the function. May be void.
Definition: ServiceDefinition.h:803
Exception thrown when an internal error has occurred.
Definition: Error.h:684
Base class for member definitions.
Definition: ServiceDefinition.h:654
virtual MemberDefinition_NoLock NoLock() const
Get member locking behavior.
std::vector< std::string > Modifiers
Modifiers for this member.
Definition: ServiceDefinition.h:673
RR_WEAK_PTR< ServiceEntryDefinition > ServiceEntry
The parent service entry definition.
Definition: ServiceDefinition.h:664
std::string DocString
Documentation string for the member.
Definition: ServiceDefinition.h:686
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:680
virtual std::string ToString()
Convert member to a string.
Definition: ServiceDefinition.h:712
std::string Name
The name of the member.
Definition: ServiceDefinition.h:657
virtual void Reset()
Clear all fields.
Class for memory member definitions.
Definition: ServiceDefinition.h:1122
boost::shared_ptr< TypeDefinition > Type
The value type of the memory.
Definition: ServiceDefinition.h:1125
MemoryDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty MemoryDefinition object.
Base class for user-defined named types.
Definition: ServiceDefinition.h:463
std::string Name
The unqualified name of the type.
Definition: ServiceDefinition.h:466
virtual DataTypes RRDataType() const =0
The type code of the type.
virtual std::string ResolveQualifiedName()=0
Resolves and returns the qualified name.
Class for objref member definitions.
Definition: ServiceDefinition.h:896
ObjRefDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty ObjRefDefinition object.
std::string ObjectType
The object type name.
Definition: ServiceDefinition.h:903
DataTypes_ArrayTypes ArrayType
The array type of the ObjRef member.
Definition: ServiceDefinition.h:913
DataTypes_ContainerTypes ContainerType
The container type of the ObjRef member.
Definition: ServiceDefinition.h:923
Class for pipe member definitions.
Definition: ServiceDefinition.h:961
boost::shared_ptr< TypeDefinition > Type
The pipe packet value type.
Definition: ServiceDefinition.h:964
PipeDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty PipeDefinition object.
Class for property and field member definitions.
Definition: ServiceDefinition.h:728
boost::shared_ptr< TypeDefinition > Type
The value type of the property or field.
Definition: ServiceDefinition.h:731
PropertyDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty PropertyDefinition object.
Robot Raconteur Version storage class.
Definition: ServiceDefinition.h:94
RobotRaconteurVersion()
Construct a new default RobotRaconteurVersion instance.
uint32_t major
The major version.
Definition: ServiceDefinition.h:171
uint32_t tweak
The tweak version.
Definition: ServiceDefinition.h:177
uint32_t patch
The patch version.
Definition: ServiceDefinition.h:175
std::string ToString() const
Get the version as a string.
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:180
void FromString(boost::string_ref v, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a version string and update version fields.
uint32_t minor
The minor version.
Definition: ServiceDefinition.h:173
RobotRaconteurVersion(uint32_t major, uint32_t minor, uint32_t patch=0, uint32_t tweak=0)
Construct a new RobotRaconteurVersion instance with a given version.
RobotRaconteurVersion(boost::string_ref v)
Construct a new RobotRaconteurVersion instance with a version parsed from as string.
Exception thrown when a service definition cannot be parsed or fails verification.
Definition: Error.h:849
Class representing a service definition.
Definition: ServiceDefinition.h:303
virtual void ToStream(std::ostream &os) const
Convert service definition to a text stream.
std::vector< boost::shared_ptr< UsingDefinition > > Using
The using types declared in this service definition.
Definition: ServiceDefinition.h:324
std::vector< boost::shared_ptr< ServiceEntryDefinition > > Pods
The pods declared in the service definition.
Definition: ServiceDefinition.h:311
std::string DocString
Top level documentation string for the service.
Definition: ServiceDefinition.h:349
void Reset()
Clear all fields.
std::vector< std::string > Imports
The names of service definitions imported by this service definition.
Definition: ServiceDefinition.h:321
void CheckVersion(const RobotRaconteurVersion &ver=RobotRaconteurVersion(0, 0)) const
Check that the service definition does not require a newer version of Robot Raconteur.
void FromStream(std::istream &is, std::vector< ServiceDefinitionParseException > &warnings, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a service definition from a stream with warnings.
void FromStream(std::istream &is, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a service definition from a stream.
std::vector< std::string > Options
The options declared in the service definition (deprecated)
Definition: ServiceDefinition.h:318
virtual std::string ToString()
Convert service definition to a string.
std::vector< boost::shared_ptr< ServiceEntryDefinition > > Structures
The structures declared in the service definition.
Definition: ServiceDefinition.h:309
std::vector< boost::shared_ptr< ConstantDefinition > > Constants
The top level constants declared in the service definition.
Definition: ServiceDefinition.h:330
std::vector< boost::shared_ptr< ServiceEntryDefinition > > Objects
The objects declared in the service definition.
Definition: ServiceDefinition.h:315
std::vector< boost::shared_ptr< ExceptionDefinition > > Exceptions
The exceptions declared in this service definition.
Definition: ServiceDefinition.h:327
std::vector< boost::shared_ptr< ServiceEntryDefinition > > NamedArrays
The named arrays declared in the service definition.
Definition: ServiceDefinition.h:313
std::vector< boost::shared_ptr< EnumDefinition > > Enums
The enums declared in this service definition.
Definition: ServiceDefinition.h:333
ServiceDefinition()
Construct a new empty ServiceDefinition.
RobotRaconteurVersion StdVer
The service definition standard version required by this service definition.
Definition: ServiceDefinition.h:336
std::string Name
The name of the service definition.
Definition: ServiceDefinition.h:306
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:343
void FromString(boost::string_ref s, std::vector< ServiceDefinitionParseException > &warnings, const ServiceDefinitionParseInfo *parse_info=NULL)
Parses a service definition from a string with warnings.
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parses a service definition from a string.
Exception thrown when a parsing error occurs.
Definition: ServiceDefinition.h:191
ServiceDefinitionParseException(const std::string &e, const ServiceDefinitionParseInfo &info)
Construct a new ServiceDefinitionParseException.
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:195
ServiceDefinitionParseException(const std::string &e)
Construct a new ServiceDefinitionParseException.
virtual std::string ToString() const
Convert exception to string.
std::string ShortMessage
Short description of the error.
Definition: ServiceDefinition.h:203
Exception thrown when a service definition verification failure occurs.
Definition: ServiceDefinition.h:245
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:249
ServiceDefinitionVerifyException(const std::string &e)
Construct a new ServiceDefinitionVerifyException.
virtual std::string ToString() const
Convert exception to string.
ServiceDefinitionVerifyException(const std::string &e, const ServiceDefinitionParseInfo &info)
Construct a new ServiceDefinitionVerifyException.
std::string ShortMessage
Short description of the error.
Definition: ServiceDefinition.h:257
Class representing a service entry definition.
Definition: ServiceDefinition.h:500
void FromString(boost::string_ref s, std::vector< ServiceDefinitionParseException > &warnings, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a service entry definition from a string with warnings.
std::vector< std::string > Implements
Object types implemented by this object.
Definition: ServiceDefinition.h:527
std::vector< boost::shared_ptr< ConstantDefinition > > Constants
The constants declared in the service entry definition.
Definition: ServiceDefinition.h:533
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:540
RR_WEAK_PTR< ServiceDefinition > ServiceDefinition_
The parent service definition.
Definition: ServiceDefinition.h:634
void Reset()
Clear all fields.
std::string DocString
Documentation string for the service entry.
Definition: ServiceDefinition.h:546
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a service entry definition from a string.
void FromStream(std::istream &is, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a service entry definition from a stream.
std::vector< std::string > Options
The options declared in the service entry definition (deprecated)
Definition: ServiceDefinition.h:530
void FromStream(std::istream &is, std::vector< ServiceDefinitionParseException > &warnings, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a service entry definition from a stream with warnings.
ServiceEntryDefinition(const boost::shared_ptr< ServiceDefinition > &def)
Construct a new empty ServiceEntryDefinition.
std::vector< boost::shared_ptr< MemberDefinition > > Members
The members of the entry definition.
Definition: ServiceDefinition.h:511
DataTypes EntryType
The type code of the entry type.
Definition: ServiceDefinition.h:520
virtual std::string ToString()
Convert service entry definition to a string.
virtual void ToStream(std::ostream &os) const
Convert service definition to a text stream.
Class for type definitions.
Definition: ServiceDefinition.h:1170
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse a type definition from string.
void RemoveArray()
Removes arrays from the type.
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:1200
std::vector< int32_t > ArrayLength
The array length.
Definition: ServiceDefinition.h:1191
bool ArrayVarLength
If true, array is variable length. If false, fixed length.
Definition: ServiceDefinition.h:1189
virtual std::string ToString()
Convert property definition to string.
static DataTypes DataTypeFromString(boost::string_ref d)
Get the DataTypes type code from a string.
void QualifyTypeStringWithUsing()
Searches the service definition for a matching using declaration, and replaces type with qualified na...
void CopyTo(TypeDefinition &def) const
Copy type definition to def.
TypeDefinition(const boost::shared_ptr< MemberDefinition > &member)
Construct a new empty TypeDefinition.
DataTypes Type
The type code of the type definition.
Definition: ServiceDefinition.h:1182
DataTypes_ArrayTypes ArrayType
The array type of the type definition.
Definition: ServiceDefinition.h:1187
void Reset()
Clear all fields.
boost::shared_ptr< TypeDefinition > Clone() const
Clones the type definition.
boost::shared_ptr< NamedTypeDefinition > ResolveNamedType(const std::vector< boost::shared_ptr< ServiceDefinition > > &other_defs=std::vector< boost::shared_ptr< ServiceDefinition > >(), const boost::shared_ptr< RobotRaconteurNode > &node=boost::shared_ptr< RobotRaconteurNode >(), const boost::shared_ptr< RRObject > &client=boost::shared_ptr< RRObject >())
Resolve the named type to a NamedTypeDefinition.
DataTypes_ContainerTypes ContainerType
The container type of the type definition.
Definition: ServiceDefinition.h:1194
static std::string StringFromDataType(DataTypes d)
Convert a DataTypes type code to a string.
TypeDefinition()
Construct a new empty TypeDefinition.
void Rename(boost::string_ref name)
Rename the type definition.
void RemoveContainers()
Removes containers from the type.
std::string Name
The name of the type definition.
Definition: ServiceDefinition.h:1179
std::string TypeString
The type name used if Type is DataTypes_namedtype_t.
Definition: ServiceDefinition.h:1184
RR_WEAK_PTR< MemberDefinition > member
The parent member of the type definition.
Definition: ServiceDefinition.h:1197
void UnqualifyTypeStringWithUsing()
Searches the service definition for a matching using declaration, and replaces type with unqualified ...
Class for using definitions.
Definition: ServiceDefinition.h:1410
RR_WEAK_PTR< ServiceDefinition > service
The parent service definition.
Definition: ServiceDefinition.h:1420
ServiceDefinitionParseInfo ParseInfo
Parsing diagnostic information.
Definition: ServiceDefinition.h:1427
std::string ToString()
Convert using definition to string.
std::string UnqualifiedName
The unqualified name of the imported type.
Definition: ServiceDefinition.h:1417
UsingDefinition(const boost::shared_ptr< ServiceDefinition > &service)
Construct a new empty UsingDefinition object.
std::string QualifiedName
The qualified name of the imported type.
Definition: ServiceDefinition.h:1415
void FromString(boost::string_ref s, const ServiceDefinitionParseInfo *parse_info=NULL)
Parse an using definition from string.
Class for wire member definitions.
Definition: ServiceDefinition.h:1070
WireDefinition(const boost::shared_ptr< ServiceEntryDefinition > &ServiceEntry)
Construct a new empty WireDefinition object.
boost::shared_ptr< TypeDefinition > Type
The wire value type.
Definition: ServiceDefinition.h:1073
Class for constant structure field definitions.
Definition: ServiceDefinition.h:1460
std::string ConstantRefName
The name of the constant the field refers to.
Definition: ServiceDefinition.h:1464
std::string Name
The name of the constant structure field.
Definition: ServiceDefinition.h:1462
Service definition parse information.
Definition: ServiceDefinition.h:67
std::string ServiceName
The name of the service containing the declaration.
Definition: ServiceDefinition.h:69
std::string Line
The text of the declaration.
Definition: ServiceDefinition.h:73
int32_t LineNumber
The line number of the declaration in the file.
Definition: ServiceDefinition.h:75
std::string RobDefFilePath
The file path of the service definition file containing the declaration.
Definition: ServiceDefinition.h:71
ServiceDefinitionParseInfo()
Construct a new ServiceDefinitionParseInfo structure.