2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of MayaDataModel.
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
10
#ifndef __MayaDM_DEPENDNODE_H__
11
#define __MayaDM_DEPENDNODE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
24
std::string mNodeType;
27
const std::string& getName()const
31
const std::string& getParent()const
39
const std::string& getType()const
43
void setFile(FILE* file)
47
void setName(const std::string& name)
51
void setParent(const std::string& parent)
55
void setShared(bool shared)
62
virtual ~DependNode(){}
64
void setIsHistoricallyInteresting(unsigned char ihi)
67
fprintf(mFile,"\tsetAttr \".ihi\" %i;\n", ihi);
69
void setCaching(bool cch)
71
if(cch == false) return;
72
fprintf(mFile,"\tsetAttr \".cch\" %i;\n", cch);
74
void setNodeState(unsigned int nds)
77
fprintf(mFile,"\tsetAttr \".nds\" %i;\n", nds);
79
void setBinMembership(const string& bnm)
81
if(bnm == "NULL") return;
82
fprintf(mFile,"\tsetAttr \".bnm\" -type \"string\" ");
86
void getMessage()const
88
fprintf(mFile,"\"%s.msg\"",mName.c_str());
90
void getIsHistoricallyInteresting()const
92
fprintf(mFile,"\"%s.ihi\"",mName.c_str());
94
void getCaching()const
96
fprintf(mFile,"\"%s.cch\"",mName.c_str());
98
void getNodeState()const
100
fprintf(mFile,"\"%s.nds\"",mName.c_str());
103
DependNode(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
104
:mFile(file), mName(name), mParent(parent), mNodeType(nodeType), mShared(shared)
110
void createNode()const
113
fprintf(mFile, "createNode %s -s -n \"%s\"", mNodeType.c_str(),mName.c_str());
115
fprintf(mFile, "createNode %s -n \"%s\"", mNodeType.c_str(),mName.c_str());
117
fprintf(mFile, " -p \"%s\"", mParent.c_str());
118
fprintf(mFile, ";\n");
123
#endif//__MayaDM_DEPENDNODE_H__