|
/*
String Split Library for Native C++ 1.1
Copyright (c) 2007 - 2008 Wong Shao Voon
The Code Project Open License (CPOL)
http://www.codeproject.com/info/cpol10.aspx
*/
#ifndef __BOOSTSTRATEGY_H__
#define __BOOSTSTRATEGY_H__
#include <vector>
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/constants.hpp>
#include "SplitStrategy.h"
#include "DataTypeRef.h"
class BoostStrategy : public ISplitStrategy
{
public:
// Constructor
BoostStrategy(
const std::wstring& sDelimit,
boost::algorithm::token_compress_mode_type CompressMode = boost::token_compress_off ) { Init( sDelimit, CompressMode ); }
virtual ~BoostStrategy() {}
void Init(
const std::wstring& sDelimit,
boost::algorithm::token_compress_mode_type CompressMode )
{
m_sDelimit = sDelimit;
m_CompressMode = CompressMode;
}
virtual size_t Extract(
const std::wstring& StrToExtract,
std::vector<Elmax::DataTypeRef*> vecDTR );
std::wstring m_sDelimit;
boost::algorithm::token_compress_mode_type m_CompressMode;
};
#endif // __BOOSTSTRATEGY_H__
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Shao Voon is from Singapore. His interest lies primarily in computer graphics, software optimization, concurrency, security, and Agile methodologies.
In recent years, he shifted focus to software safety research. His hobby is writing a free C++ DirectX photo slideshow application which can be viewed
here.