forked from microsoft/AdaptiveCards
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathFact.h
More file actions
39 lines (31 loc) · 1.11 KB
/
Fact.h
File metadata and controls
39 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "pch.h"
#include "ElementParserRegistration.h"
#include "DateTimePreparser.h"
namespace AdaptiveCards
{
class Fact
{
public:
Fact();
Fact(std::string const& title, std::string const& value);
std::string Serialize();
Json::Value SerializeToJsonValue();
std::string GetTitle() const;
void SetTitle(const std::string& value);
std::string GetValue() const;
void SetValue(const std::string& value);
DateTimePreparser GetTitleForDateParsing() const;
DateTimePreparser GetValueForDateParsing() const;
void SetLanguage(const std::string& value);
const std::string& GetLanguage() const;
static std::shared_ptr<Fact> Deserialize(ParseContext& context, const Json::Value& root);
static std::shared_ptr<Fact> DeserializeFromString(ParseContext& context, const std::string& jsonString);
private:
std::string m_title;
std::string m_value;
std::string m_language;
};
}