87 lines
1.7 KiB
C++
87 lines
1.7 KiB
C++
#ifndef _SQL_DATAITEM_HPP_
|
|
#define _SQL_DATAITEM_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common.string.hpp>
|
|
#endif
|
|
|
|
class DataItem
|
|
{
|
|
public:
|
|
DataItem(void);
|
|
DataItem(const DataItem &someDataItem);
|
|
DataItem(const String &sourceName,const String &sourceDescription);
|
|
virtual ~DataItem();
|
|
DataItem &operator=(const DataItem &someDataItem);
|
|
WORD operator==(const DataItem &someDataItem);
|
|
const String &sourceName(void)const;
|
|
void sourceName(const String &sourceName);
|
|
const String &sourceDescription(void)const;
|
|
void sourceDescription(const String &sourceDescription);
|
|
private:
|
|
String mSourceName;
|
|
String mSourceDescription;
|
|
};
|
|
|
|
inline
|
|
DataItem::DataItem(void)
|
|
{
|
|
}
|
|
|
|
DataItem::DataItem(const DataItem &someDataItem)
|
|
{
|
|
*this=someDataItem;
|
|
}
|
|
|
|
inline
|
|
DataItem::DataItem(const String &sourceName,const String &sourceDescription)
|
|
: mSourceName(sourceName), mSourceDescription(sourceDescription)
|
|
{
|
|
}
|
|
|
|
inline
|
|
DataItem::~DataItem()
|
|
{
|
|
}
|
|
|
|
inline
|
|
DataItem &DataItem::operator=(const DataItem &someDataItem)
|
|
{
|
|
sourceName(someDataItem.sourceName());
|
|
sourceDescription(someDataItem.sourceDescription());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD DataItem::operator==(const DataItem &someDataItem)
|
|
{
|
|
return (sourceName()==someDataItem.sourceName()&&
|
|
sourceDescription()==someDataItem.sourceDescription());
|
|
}
|
|
|
|
inline
|
|
const String &DataItem::sourceName(void)const
|
|
{
|
|
return mSourceName;
|
|
}
|
|
|
|
inline
|
|
void DataItem::sourceName(const String &sourceName)
|
|
{
|
|
mSourceName=sourceName;
|
|
}
|
|
|
|
inline
|
|
const String &DataItem::sourceDescription(void)const
|
|
{
|
|
return mSourceDescription;
|
|
}
|
|
|
|
inline
|
|
void DataItem::sourceDescription(const String &sourceDescription)
|
|
{
|
|
mSourceDescription=sourceDescription;
|
|
}
|
|
#endif |