objectMapI.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "IOstreams.H"
00030
00031
00032
00033 namespace Foam
00034 {
00035
00036
00037
00038 inline objectMap::objectMap()
00039 :
00040 index_(-1),
00041 masterObjects_(0)
00042 {}
00043
00044
00045 inline objectMap::objectMap(const label index, const labelList& master)
00046 :
00047 index_(index),
00048 masterObjects_(master)
00049 {}
00050
00051
00052 inline objectMap::objectMap(Istream& is)
00053 {
00054
00055 is.readBegin("objectMap");
00056
00057 is >> index_ >> static_cast<labelList&>(masterObjects_);
00058
00059
00060 is.readEnd("objectMap");
00061
00062
00063 is.check("objectMap::objectMap(Istream&)");
00064 }
00065
00066
00067
00068
00069 label& objectMap::index()
00070 {
00071 return index_;
00072 }
00073
00074
00075 inline label objectMap::index() const
00076 {
00077 return index_;
00078 }
00079
00080
00081 inline labelList& objectMap::masterObjects()
00082 {
00083 return masterObjects_;
00084 }
00085
00086
00087 inline const labelList& objectMap::masterObjects() const
00088 {
00089 return masterObjects_;
00090 }
00091
00092
00093
00094
00095 inline bool operator==(const objectMap& a, const objectMap& b)
00096 {
00097 return
00098 (
00099 (a.index_ == b.index_) && (a.masterObjects_ == b.masterObjects_)
00100 );
00101 }
00102
00103
00104 inline bool operator!=(const objectMap& a, const objectMap& b)
00105 {
00106 return (!(a == b));
00107 }
00108
00109
00110
00111
00112 inline Ostream& operator<<(Ostream& os, const objectMap& a)
00113 {
00114 os << token::BEGIN_LIST
00115 << a.index_ << token::SPACE
00116 << a.masterObjects_
00117 << token::END_LIST;
00118
00119
00120 os.check("Ostream& operator<<(Ostream&, const objectMap&)");
00121
00122 return os;
00123 }
00124
00125
00126
00127
00128 }
00129
00130
Copyright © 2000-2009 OpenCFD Ltd