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_CHARACTERMAP_H__
11
#define __MayaDM_CHARACTERMAP_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class CharacterMap : public DependNode
22
CharacterMap():DependNode(){}
23
CharacterMap(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "characterMap", shared, create){}
25
virtual ~CharacterMap(){}
27
void setMemberIndex(size_t mi_i,const intArray& mi)
29
if(mi.size == 0) return;
30
fprintf(mFile,"\tsetAttr \".mi[%i]\" -type \"intArray\" ",mi_i);
34
void setMemberIndex(size_t mi_start,size_t mi_end,intArray* mi)
36
fprintf(mFile,"\tsetAttr \".mi[%i:%i]\" ", mi_start,mi_end);
37
size_t size = (mi_end-mi_start)*1+1;
38
for(size_t i=0;i<size;++i)
45
void startMemberIndex(size_t mi_start,size_t mi_end)const
47
fprintf(mFile,"\tsetAttr \".mi[%i:%i]\"",mi_start,mi_end);
48
fprintf(mFile," -type \"intArray\" ");
50
void appendMemberIndex(const intArray& mi)const
55
void endMemberIndex()const
59
void getMember(size_t m_i)const
61
fprintf(mFile,"\"%s.m[%i]\"",mName.c_str(),m_i);
66
fprintf(mFile,"\"%s.m\"",mName.c_str());
69
CharacterMap(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
70
:DependNode(file, name, parent, nodeType, shared, create) {}
74
#endif//__MayaDM_CHARACTERMAP_H__