~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to COLLADAStreamWriter/include/COLLADASWTechnique.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
        This file is part of COLLADAStreamWriter.
 
5
        
 
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
 
9
*/
 
10
 
 
11
 
 
12
#ifndef __COLLADASTREAMWRITER_TECHNIQUE_H__
 
13
#define __COLLADASTREAMWRITER_TECHNIQUE_H__
 
14
 
 
15
#include "COLLADASWPrerequisites.h"
 
16
#include "COLLADASWElementWriter.h"
 
17
#include <map>
 
18
 
 
19
namespace COLLADASW
 
20
{
 
21
 
 
22
    /** A class to add an asset to the stream*/
 
23
    class Technique : public ElementWriter
 
24
    {
 
25
 
 
26
    private:
 
27
 
 
28
        /** Used to close the current @a \<technique\> tag */
 
29
        TagCloser mTechniqueCloser;
 
30
 
 
31
        /** Manages a map with the currently opened child elements */
 
32
        std::map<String, TagCloser> mOpenChildElements;
 
33
 
 
34
    public:
 
35
        /** Constructor that sets the stream the asset should be written to*/
 
36
        Technique ( StreamWriter* streamWriter ) : ElementWriter ( streamWriter ) {}
 
37
 
 
38
        /** Opens the technique tag */
 
39
        void openTechnique ( const String &profile, const String &xmlns="" );
 
40
 
 
41
        /** Writes the given string to the collada document. */
 
42
        void addValue ( const String& value );
 
43
 
 
44
        /** Adds a parameter to the technique */
 
45
        void addParameter ( const String &paramName, const String &value="", const String &sid="" );
 
46
 
 
47
        /** Adds a parameter to the technique */
 
48
        void addParameter ( const String &paramName, const int &value, const String &sid="" );
 
49
 
 
50
        /** Adds a parameter to the technique */
 
51
        void addParameter ( const String &paramName, const double &value, const String &sid="" );
 
52
 
 
53
        /** Adds a parameter to the technique */
 
54
        void addParameter ( const String &paramName, const float &value, const String &sid="" );
 
55
 
 
56
        /** Adds a parameter to the technique */
 
57
        void addParameter ( const String &paramName, const bool &value, const String &sid="" );
 
58
 
 
59
        /** Adds a parameter to the technique */
 
60
        void addMatrixParameter ( const String &paramName, const double matrix[][4], const String &sid="" ) const;
 
61
 
 
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 );
 
64
 
 
65
        /** Closes the tag with the given name, if it is open */
 
66
        void closeChildElement ( const String &childElementName );
 
67
 
 
68
        /** Closes the technique tag */
 
69
        void closeTechnique();
 
70
 
 
71
    };
 
72
 
 
73
} //namespace COLLADASW
 
74
 
 
75
 
 
76
#endif //__COLLADASTREAMWRITER_TECHNIQUE_H__
 
77