fbxsdk/core/base/fbxpair.h Source File

fbxpair.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_BASE_PAIR_H_
14 #define _FBXSDK_CORE_BASE_PAIR_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/fbxsdk_nsbegin.h>
19 
22 template <typename First, typename Second> class FbxPair
23 {
24 public:
26  inline FbxPair() : mFirst(), mSecond() {}
27 
31  inline FbxPair(const First& pFirst, const Second& pSecond) : mFirst(pFirst), mSecond(pSecond) {}
32 
36  {
37  mFirst = pOther.mFirst;
38  mSecond = pOther.mSecond;
39  return *this;
40  }
41 
44  inline bool operator==(const FbxPair<First, Second>& pOther)
45  {
46  return mFirst == pOther.mFirst && mSecond == pOther.mSecond;
47  }
48 
51  inline bool operator!=(const FbxPair<First, Second>& pOther)
52  {
53  return !operator==(pOther);
54  }
55 
56  First mFirst;
57  Second mSecond;
58 };
59 
60 #include <fbxsdk/fbxsdk_nsend.h>
61 
62 #endif /* _FBXSDK_CORE_BASE_PAIR_H_ */
FBX SDK environment definition.
FbxPair()
Constructor.
Definition: fbxpair.h:26
bool operator==(const FbxPair< First, Second > &pOther)
Comparison operator.
Definition: fbxpair.h:44
This class template holds a pair of objects.
Definition: fbxpair.h:22
FbxPair< First, Second > & operator=(const FbxPair< First, Second > &pOther)
Assignment operator.
Definition: fbxpair.h:35
Second mSecond
The second object in the pair.
Definition: fbxpair.h:57
FbxPair(const First &pFirst, const Second &pSecond)
Constructor.
Definition: fbxpair.h:31
bool operator!=(const FbxPair< First, Second > &pOther)
Inverse comparison operator.
Definition: fbxpair.h:51
First mFirst
The first object in the pair.
Definition: fbxpair.h:56