summaryrefslogtreecommitdiffstats
path: root/libdash/source/mpd/ContentComponent.cpp
blob: ce3de857728bed4bd6e42caabd5003266918211b (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
 * ContentComponent.cpp
 *****************************************************************************
 * Copyright (C) 2012, bitmovin Softwareentwicklung OG, All Rights Reserved
 *
 * Email: libdash-dev@vicky.bitmovin.net
 *
 * This source code and its use and distribution, is subject to the terms
 * and conditions of the applicable license agreement.
 *****************************************************************************/

#include "ContentComponent.h"

using namespace dash::mpd;

ContentComponent::ContentComponent  ()  :
                    id(0),
                    lang(""),
                    contentType(""),
                    par("")
{
}
ContentComponent::~ContentComponent ()
{
    for(size_t i = 0; i < this->accessibility.size(); i++)
        delete(this->accessibility.at(i));
    for(size_t i = 0; i < this->role.size(); i++)
        delete(this->role.at(i));
    for(size_t i = 0; i < this->rating.size(); i++)
        delete(this->rating.at(i));
    for(size_t i = 0; i < this->viewpoint.size(); i++)
        delete(this->viewpoint.at(i));
}

const std::vector<IDescriptor *>&   ContentComponent::GetAccessibility  ()  const
{
    return (std::vector<IDescriptor *> &)this->accessibility;
}
void                                ContentComponent::AddAccessibity    (Descriptor *accessibility)
{
    this->accessibility.push_back(accessibility);
}
const std::vector<IDescriptor *>&   ContentComponent::GetRole           ()  const
{
    return (std::vector<IDescriptor *> &)this->role;
}
void                                ContentComponent::AddRole           (Descriptor *role)
{
    this->role.push_back(role);
}
const std::vector<IDescriptor *>&   ContentComponent::GetRating         ()  const
{
    return (std::vector<IDescriptor *> &)this->rating;
}
void                                ContentComponent::AddRating         (Descriptor *rating)
{
    this->rating.push_back(rating);
}
const std::vector<IDescriptor *>&   ContentComponent::GetViewpoint      ()  const
{
    return (std::vector<IDescriptor *> &)this->viewpoint;
}
void                                ContentComponent::AddViewpoint      (Descriptor *viewpoint)
{
    this->viewpoint.push_back(viewpoint);
}
uint32_t                            ContentComponent::GetId             ()  const
{
    return this->id;
}
void                                ContentComponent::SetId             (uint32_t id)
{
    this->id = id;
}
const std::string&                  ContentComponent::GetLang           ()  const
{
    return this->lang;
}
void                                ContentComponent::SetLang           (const std::string& lang)
{
    this->lang = lang;
}
const std::string&                  ContentComponent::GetContentType    ()  const
{
    return this->contentType;
}
void                                ContentComponent::SetContentType    (const std::string& contentType)
{
    this->contentType = contentType;
}
const std::string&                  ContentComponent::GetPar            ()  const
{
    return this->par;
}
void                                ContentComponent::SetPar            (const std::string& par)
{
    this->par = par;
}