| 1234567891011121314151617181920212223242526272829303132333435 |
- #pragma once
- #include <list>
- #include <vector>
- #include <memory>
- #include "Chan.h"
- class Session
- {
- public:
- Session(const std::string&strId);
- ~Session();
- std::string Id()const { return m_strId; }
- void addChan(const std::shared_ptr<Chan>&spChan);
- void delChan(const std::shared_ptr<Chan>&spChan);
-
- const std::shared_ptr<Chan> getChan(const std::string&strChanID);
- const std::shared_ptr<Chan> getFirstChan();
- const std::shared_ptr<Chan> getAssoChan(const std::shared_ptr<Chan>&spChan);
- const std::shared_ptr<Chan> getAssoChan(const std::string&strChanID);
- void printfChanList();
- auto size() const { return m_lstChan.size(); }
- auto transSentenceIndex() { return ++m_transSentenceIndex; }
- private:
- std::string m_strId;
- std::list<std::shared_ptr<Chan>> m_lstChan;
- std::int32_t m_transSentenceIndex; // 实时转译序号
- };
|