2021-05-31 05:42:20 +00:00
|
|
|
//
|
2022-06-20 11:22:25 +00:00
|
|
|
// Copyright (c) 2013-2022 The SRS Authors
|
2021-05-31 05:42:20 +00:00
|
|
|
//
|
2022-01-13 10:40:17 +00:00
|
|
|
// SPDX-License-Identifier: MIT or MulanPSL-2.0
|
2021-05-31 05:42:20 +00:00
|
|
|
//
|
2013-12-07 12:51:27 +00:00
|
|
|
|
|
|
|
#include <srs_core.hpp>
|
|
|
|
|
2020-07-09 09:16:59 +00:00
|
|
|
_SrsContextId::_SrsContextId()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
_SrsContextId::_SrsContextId(const _SrsContextId& cp)
|
|
|
|
{
|
|
|
|
v_ = cp.v_;
|
|
|
|
}
|
|
|
|
|
2020-07-11 12:58:25 +00:00
|
|
|
_SrsContextId& _SrsContextId::operator=(const _SrsContextId& cp)
|
|
|
|
{
|
|
|
|
v_ = cp.v_;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2020-07-10 10:06:07 +00:00
|
|
|
_SrsContextId::~_SrsContextId()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* _SrsContextId::c_str() const
|
2020-07-09 09:16:59 +00:00
|
|
|
{
|
|
|
|
return v_.c_str();
|
|
|
|
}
|
|
|
|
|
2020-07-10 10:06:07 +00:00
|
|
|
bool _SrsContextId::empty() const
|
2020-07-09 09:16:59 +00:00
|
|
|
{
|
|
|
|
return v_.empty();
|
|
|
|
}
|
|
|
|
|
2020-08-30 02:13:23 +00:00
|
|
|
int _SrsContextId::compare(const _SrsContextId& to) const
|
2020-08-30 01:53:10 +00:00
|
|
|
{
|
2020-08-30 02:13:23 +00:00
|
|
|
return v_.compare(to.v_);
|
2020-08-30 01:53:10 +00:00
|
|
|
}
|
|
|
|
|
2020-08-30 02:13:23 +00:00
|
|
|
_SrsContextId& _SrsContextId::set_value(const std::string& v)
|
2020-07-09 09:16:59 +00:00
|
|
|
{
|
2020-08-30 02:13:23 +00:00
|
|
|
v_ = v;
|
|
|
|
return *this;
|
2020-07-09 09:16:59 +00:00
|
|
|
}
|
2014-08-02 14:18:39 +00:00
|
|
|
|