Free Electron
MayaGraph.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __maya_MayaGraph_h__
8 #define __maya_MayaGraph_h__
9 
10 //* NOTE needed to key std::map<> with MObject
11 inline bool operator<(const MObject& rLeft,const MObject& rRight)
12 {
13  return *(int*)(void*)(&rLeft) < *(int*)(void*)(&rRight);
14 }
15 
16 namespace fe
17 {
18 namespace ext
19 {
20 
21 //* public accessible version of MObject (cast by pointer)
22 class MayaObject
23 {
24  public:
25  MPtrBase* ptr;
26 #if defined (MBits64_)
27  MFn::Type tp;
28 #else
29  unsigned short tp;
30 #endif // defined (MBits64_)
31  unsigned short flags;
32 };
33 
34 /**************************************************************************//**
35  @brief Maya DAG Navigation
36 
37  @ingroup maya
38 *//***************************************************************************/
39 class FE_DL_EXPORT MayaGraph:
40  public MetaGraph,
41  public CastableAs<MayaGraph>
42 {
43  public:
44  MayaGraph(void);
45 virtual ~MayaGraph(void);
46 
47 virtual sp<ImageI> image(void);
48 
49 virtual BWORD connect(String a_outputName,String a_outputConnector,
50  String a_inputName,String a_inputConnector);
51 virtual BWORD disconnect(String a_inputName,String a_inputConnector);
52 
53  BWORD isBuilt(void) { return m_spImage.isValid(); }
54  void discard(void) { m_spImage=NULL; }
55 
56  private:
57 
58  sp<ImageI> rebuild(void);
59 
60  MCallbackId m_cid;
61 
62  sp<ImageI> m_spImage;
63 };
64 
65 } /* namespace ext */
66 } /* namespace fe */
67 
68 #endif /* __maya_MayaGraph_h__ */
kernel
Definition: namespace.dox:3
BWORD operator<(const sp< T > &rspLeft, const sp< X > &rspRight)
Definition: src/core/ptr.h:285
Common graph navigation for Houdini, Maya, etc.
Definition: MetaGraph.h:20
Maya DAG Navigation.
Definition: MayaGraph.h:39
Automatically reference-counted string container.
Definition: String.h:128
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192