90 lines
1.5 KiB
C++
90 lines
1.5 KiB
C++
#ifndef _NNTP_NEWSGROUP_HPP_
|
|
#define _NNTP_NEWSGROUP_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
|
|
class NewsGroup
|
|
{
|
|
public:
|
|
NewsGroup(void);
|
|
NewsGroup(const NewsGroup &someNewsGroup);
|
|
NewsGroup(const String &groupName,DWORD active);
|
|
virtual ~NewsGroup();
|
|
NewsGroup &operator=(const NewsGroup &someNewsGroup);
|
|
WORD operator==(const NewsGroup &someNewsGroup)const;
|
|
const String &newsGroup(void)const;
|
|
void newsGroup(const String &newsGroup);
|
|
DWORD active(void)const;
|
|
void active(DWORD active);
|
|
private:
|
|
String mNewsGroup;
|
|
DWORD mIsActive;
|
|
};
|
|
|
|
inline
|
|
NewsGroup::NewsGroup(void)
|
|
: mIsActive(FALSE)
|
|
{
|
|
}
|
|
|
|
inline
|
|
NewsGroup::NewsGroup(const NewsGroup &someNewsGroup)
|
|
{
|
|
*this=someNewsGroup;
|
|
}
|
|
|
|
inline
|
|
NewsGroup::NewsGroup(const String &groupName,DWORD active)
|
|
{
|
|
mNewsGroup=groupName;
|
|
mIsActive=active;
|
|
}
|
|
|
|
inline
|
|
NewsGroup::~NewsGroup()
|
|
{
|
|
}
|
|
|
|
inline
|
|
NewsGroup &NewsGroup::operator=(const NewsGroup &someNewsGroup)
|
|
{
|
|
newsGroup(someNewsGroup.newsGroup());
|
|
active(someNewsGroup.active());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD NewsGroup::operator==(const NewsGroup &someNewsGroup)const
|
|
{
|
|
return (newsGroup()==someNewsGroup.newsGroup());
|
|
}
|
|
|
|
inline
|
|
const String &NewsGroup::newsGroup(void)const
|
|
{
|
|
return mNewsGroup;
|
|
}
|
|
|
|
inline
|
|
void NewsGroup::newsGroup(const String &newsGroup)
|
|
{
|
|
mNewsGroup=newsGroup;
|
|
}
|
|
|
|
inline
|
|
DWORD NewsGroup::active(void)const
|
|
{
|
|
return mIsActive;
|
|
}
|
|
|
|
inline
|
|
void NewsGroup::active(DWORD isActive)
|
|
{
|
|
mIsActive=isActive;
|
|
}
|
|
#endif
|