2
Copyright (c) 2011 Cooperative Studio Lumikuu
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
11
#include "COLLADASWStreamWriter.h"
12
#include "COLLADASWLibraryNodes.h"
13
#include "COLLADASWConstants.h"
14
#include "COLLADABUUtils.h"
18
LibraryNodes::LibraryNodes ( COLLADASW::StreamWriter *streamWriter )
19
: Library ( streamWriter, CSWC::CSW_ELEMENT_LIBRARY_NODES )
22
void LibraryNodes::openNode ( const String &nodeId, const String &nodeName )
24
// opening library here. TBH this looks weird and should
25
// just be an explicit client call.
29
mCurrentNodeCloser = mSW->openElement ( CSWC::CSW_ELEMENT_NODE );
31
if ( !nodeId.empty() )
32
mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_ID, nodeId );
34
if ( !nodeName.empty() )
35
mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_NAME, nodeName );
38
void LibraryNodes::closeNode()
40
mCurrentNodeCloser.close();