blob: 392746b711512d54e8b25c6df30c0187d9a6ceef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
*
*/
#include "XMLObject.hxx"
#include "XMLNotHandledElement.hxx"
#include "VariableScope.hxx"
extern "C"
{
extern const char *nodes_type[];
}
namespace org_modules_xml
{
XMLNotHandledElement::XMLNotHandledElement(const XMLObject & _parent, xmlNode * _node):XMLObject(), parent(_parent)
{
node = _node;
scilabType = XMLNOTHANDLED;
id = scope->getVariableId(*this);
scope->registerPointers(node, this);
}
XMLNotHandledElement::~XMLNotHandledElement()
{
scope->unregisterPointer(node);
scope->removeId(id);
}
void *XMLNotHandledElement::getRealXMLPointer() const
{
return static_cast < void *>(node);
}
const XMLObject *XMLNotHandledElement::getXMLObjectParent() const
{
return &parent;
}
const std::string XMLNotHandledElement::toString() const
{
std::ostringstream oss;
oss << "Not handled XML Element" << std::endl;
oss << "type: " << nodes_type[node->type - 1];
return oss.str();
}
}
|