Click here to Skip to main content
15,860,861 members
Articles / Programming Languages / Visual C++ 10.0

Linq-To-XML Style of Node Creation for C++

Rate me:
Please Sign up or sign in to vote.
4.78/5 (14 votes)
12 Apr 2016Ms-PL11 min read 43.3K   500   29  
Linq-To-XML Node Creation for Native C++
/*
TextOut Library for Native C++ version 1.1.2

Copyright (c) 2007 - 2008 Wong Shao Voon

The Code Project Open License (CPOL)
http://www.codeproject.com/info/cpol10.aspx
*/

#pragma once

#pragma warning( disable : 4786 )

#include <vector>
#include "Box.h"

class AbstractTextout
{
public:
	void Print( 
		const wchar_t* fmt);

	void Print( 
		const wchar_t* fmt, 
		Box D1 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4, Box D5 );
	
	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4, Box D5, Box D6 );
	
	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4, Box D5, Box D6, Box D7 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4, 
		Box D5, Box D6, Box D7, Box D8 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4, 
		Box D5, Box D6, Box D7, Box D8, Box D9 );

	void Print( 
		const wchar_t* fmt, 
		Box D1, Box D2, Box D3, Box D4, Box D5, 
		Box D6, Box D7, Box D8, Box D9, Box D10 );

	std::wstring StrReplace( 
		std::wstring& fmtstr, 
		const std::vector<std::wstring>& vs );

	std::wstring StrAnchor( size_t i );

protected:
	virtual void Process(const std::wstring& str) = 0;


};

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.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior)
Singapore Singapore
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.

Comments and Discussions