2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Contributor(s): Nathan Letwory.
20
* ***** END GPL LICENSE BLOCK *****
23
/** \file blender/collada/ExtraTags.h
31
/** \brief Class for saving \<extra\> tags for a specific UniqueId.
37
ExtraTags(const std::string profile);
42
/** Handle the beginning of an element. */
43
bool addTag(std::string tag, std::string data);
45
/** Set given short pointer to value of tag, if it exists. */
46
void setData(std::string tag, short *data);
48
/** Set given int pointer to value of tag, if it exists. */
49
void setData(std::string tag, int *data);
51
/** Set given float pointer to value of tag, if it exists. */
52
void setData(std::string tag, float *data);
54
/** Set given char pointer to value of tag, if it exists. */
55
void setData(std::string tag, char *data);
57
/** Return true if the extra tags is for specified profile. */
58
bool isProfile(std::string profile);
61
/** Disable default copy constructor. */
62
ExtraTags( const ExtraTags& pre );
63
/** Disable default assignment operator. */
64
const ExtraTags& operator= ( const ExtraTags& pre );
66
/** The profile for which the tags are. */
69
/** Map of tag and text pairs. */
70
std::map<std::string, std::string> tags;
72
/** Get text data for tag as an int. */
73
int asInt(std::string tag, bool *ok);
74
/** Get text data for tag as a float. */
75
float asFloat(std::string tag, bool *ok);
76
/** Get text data for tag as a string. */
77
std::string asString(std::string tag, bool *ok);