2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADAStreamWriter.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
12
#ifndef __COLLADASTREAMWRITER_TECHNIQUE_H__
13
#define __COLLADASTREAMWRITER_TECHNIQUE_H__
15
#include "COLLADASWPrerequisites.h"
16
#include "COLLADASWElementWriter.h"
22
/** A class to add an asset to the stream*/
23
class Technique : public ElementWriter
28
/** Used to close the current @a \<technique\> tag */
29
TagCloser mTechniqueCloser;
31
/** Manages a map with the currently opened child elements */
32
std::map<String, TagCloser> mOpenChildElements;
35
/** Constructor that sets the stream the asset should be written to*/
36
Technique ( StreamWriter* streamWriter ) : ElementWriter ( streamWriter ) {}
38
/** Opens the technique tag */
39
void openTechnique ( const String &profile, const String &xmlns="" );
41
/** Writes the given string to the collada document. */
42
void addValue ( const String& value );
44
/** Adds a parameter to the technique */
45
void addParameter ( const String ¶mName, const String &value="", const String &sid="" );
47
/** Adds a parameter to the technique */
48
void addParameter ( const String ¶mName, const int &value, const String &sid="" );
50
/** Adds a parameter to the technique */
51
void addParameter ( const String ¶mName, const double &value, const String &sid="" );
53
/** Adds a parameter to the technique */
54
void addParameter ( const String ¶mName, const float &value, const String &sid="" );
56
/** Adds a parameter to the technique */
57
void addParameter ( const String ¶mName, const bool &value, const String &sid="" );
59
/** Adds a parameter to the technique */
60
void addMatrixParameter ( const String ¶mName, const double matrix[][4], const String &sid="" ) const;
62
/** Opens a tag with the given name and adds the TagCloser to the child element into a map */
63
void addChildElement ( const String &childElementName );
65
/** Closes the tag with the given name, if it is open */
66
void closeChildElement ( const String &childElementName );
68
/** Closes the technique tag */
69
void closeTechnique();
73
} //namespace COLLADASW
76
#endif //__COLLADASTREAMWRITER_TECHNIQUE_H__