Rumba C++ SDK
AttributeDescriptor.h
Go to the documentation of this file.
1 /*
2 
3  *
4  ***
5  *****
6  ********************* Mercenaries Engineering SARL
7  ***************** Copyright (C) 2018
8  *************
9  ********* http://www.mercenaries-engineering.com
10  ***********
11  **** ****
12  ** **
13 
14 */
15 #pragma once
16 
17 #include <memory>
18 #include <string>
19 
20 #include "Maquina/Dict.h"
21 
22 namespace maquina
23 {
26  {
27  public:
28  const std::string& as_string() const { return _desc; }
29 
30  const Dict& as_dict() const { return _dict; }
31 
32  public:
33  MAQUINA_EXPORT static std::shared_ptr<AttributeDescriptor> get_descriptor(const std::string& desc);
34  MAQUINA_EXPORT static std::shared_ptr<AttributeDescriptor> get_descriptor(const maquina::Dict& desc);
35 
36  private:
37  MAQUINA_EXPORT AttributeDescriptor(const std::string& desc);
38 
39  std::string _desc;
40  Dict _dict;
41  };
42 
43  MAQUINA_EXPORT std::string value_to_json_string(const maquina::Value& value);
44 }
const Dict & as_dict() const
Definition: AttributeDescriptor.h:30
const std::string & as_string() const
Definition: AttributeDescriptor.h:28
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
An AttributeDescriptor.
Definition: AttributeDescriptor.h:25
#define MAQUINA_EXPORT
Definition: Export.h:31
MAQUINA_EXPORT std::string value_to_json_string(const maquina::Value &value)
A dictionnary to associate strings to values.
Definition: Dict.h:24
static MAQUINA_EXPORT std::shared_ptr< AttributeDescriptor > get_descriptor(const std::string &desc)
Base class of all Rumba values.
Definition: Value.h:34