Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / 3d / pipeline_max / builtin / i_node.h
blob1e033a5cadebfa078613432c51a01f09f25e5c85
1 /**
2 * \file i_node.h
3 * \brief INode
4 * \date 2012-08-22 19:45GMT
5 * \author Jan Boon (Kaetemi)
6 * INode
7 */
9 /*
10 * Copyright (C) 2012 by authors
12 * This file is part of RYZOM CORE PIPELINE.
13 * RYZOM CORE PIPELINE is free software: you can redistribute it
14 * and/or modify it under the terms of the GNU Affero General Public
15 * License as published by the Free Software Foundation, either
16 * version 3 of the License, or (at your option) any later version.
18 * RYZOM CORE PIPELINE is distributed in the hope that it will be
19 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Affero General Public License for more details.
23 * You should have received a copy of the GNU Affero General Public
24 * License along with RYZOM CORE PIPELINE. If not, see
25 * <http://www.gnu.org/licenses/>.
28 #ifndef PIPELINE_I_NODE_H
29 #define PIPELINE_I_NODE_H
30 #include <nel/misc/types_nl.h>
32 // STL includes
34 // NeL includes
36 // Project includes
37 #include "reference_target.h"
39 namespace PIPELINE {
40 namespace MAX {
41 namespace BUILTIN {
43 /**
44 * \brief INode
45 * \date 2012-08-22 19:45GMT
46 * \author Jan Boon (Kaetemi)
47 * INode
49 class INode : public CReferenceTarget
51 public:
52 INode(CScene *scene);
53 virtual ~INode();
55 // class desc
56 static const ucstring DisplayName;
57 static const char *InternalName;
58 static const char *InternalNameUnknown;
59 static const NLMISC::CClassId ClassId;
60 static const TSClassId SuperClassId;
62 // inherited
63 virtual void parse(uint16 version, uint filter = 0);
64 virtual void clean();
65 virtual void build(uint16 version, uint filter = 0);
66 virtual void disown();
67 virtual void init();
68 virtual bool inherits(const NLMISC::CClassId classId) const;
69 virtual const ISceneClassDesc *classDesc() const;
70 virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "", uint filter = 0) const;
72 // node interface
73 virtual INode *parent();
74 virtual void setParent(INode *node);
75 virtual void addChild(INode *node);
76 virtual void removeChild(INode *node); // does not delete
77 virtual const ucstring &userName() const;
78 INode *find(const ucstring &userName) const;
80 // dump
81 void dumpNodes(std::ostream &ostream, const std::string &pad = "") const;
83 // read access
84 /// The children that are linked to this node by the parent tag
85 inline const std::set<NLMISC::CRefPtr<INode> > &children() const { return m_Children; }
87 protected:
88 // inherited
89 virtual IStorageObject *createChunkById(uint16 id, bool container);
91 protected:
92 std::set<NLMISC::CRefPtr<INode> > m_Children;
94 }; /* class INode */
96 typedef CSceneClassDesc<INode> CNodeClassDesc;
97 extern const CNodeClassDesc NodeClassDesc;
98 typedef CSuperClassDesc<INode> CNodeSuperClassDesc;
99 extern const CNodeSuperClassDesc NodeSuperClassDesc;
101 } /* namespace BUILTIN */
102 } /* namespace MAX */
103 } /* namespace PIPELINE */
105 #endif /* #ifndef PIPELINE_I_NODE_H */
107 /* end of file */