Blender  V2.93
ExtraHandler.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #include <algorithm> /* sort() */
24 #include <map>
25 #include <string>
26 #include <vector>
27 
28 #include "COLLADASWInstanceController.h"
29 #include "COLLADASaxFWLFilePartLoader.h"
30 #include "COLLADASaxFWLIExtraDataCallbackHandler.h"
31 
32 #include "AnimationImporter.h"
33 #include "DocumentImporter.h"
34 
38 class ExtraHandler : public COLLADASaxFWL::IExtraDataCallbackHandler {
39  public:
42 
44  bool elementBegin(const char *elementName, const char **attributes);
45 
47  bool elementEnd(const char *elementName);
48 
50  bool textData(const char *text, size_t textLength);
51 
54  bool parseElement(const char *profileName,
55  const unsigned long &elementHash,
56  const COLLADAFW::UniqueId &uniqueId,
57  COLLADAFW::Object *object);
58 
60  bool parseElement(const char *profileName,
61  const unsigned long &elementHash,
62  const COLLADAFW::UniqueId &uniqueId);
63 
64  private:
66  ExtraHandler(const ExtraHandler &pre);
68  const ExtraHandler &operator=(const ExtraHandler &pre);
69 
71  DocumentImporter *dimp;
72  AnimationImporter *aimp;
74  COLLADAFW::UniqueId currentUid;
75  ExtraTags *currentExtraTags;
76  std::string currentElement;
77 };
struct Object Object
static int uniqueId
Definition: btRigidBody.cpp:27
Handler class for <extra> data, through which different profiles can be handled.
Definition: ExtraHandler.h:38
bool textData(const char *text, size_t textLength)
bool parseElement(const char *profileName, const unsigned long &elementHash, const COLLADAFW::UniqueId &uniqueId, COLLADAFW::Object *object)
bool elementBegin(const char *elementName, const char **attributes)
ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp)
bool elementEnd(const char *elementName)
Class for saving <extra> tags for a specific UniqueId.
Definition: ExtraTags.h:29