dictionaryEntryIO.C
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
00030 #include "keyType.H"
00031 #include "dictionaryEntry.H"
00032 #include "IOstreams.H"
00033
00034
00035
00036 Foam::dictionaryEntry::dictionaryEntry
00037 (
00038 const dictionary& parentDict,
00039 Istream& is
00040 )
00041 :
00042 entry(is),
00043 dictionary(parentDict, is)
00044 {
00045 is.fatalCheck
00046 (
00047 "dictionaryEntry::dictionaryEntry"
00048 "(const dictionary& parentDict, Istream&)"
00049 );
00050 }
00051
00052
00053 Foam::dictionaryEntry::dictionaryEntry
00054 (
00055 const keyType& key,
00056 const dictionary& parentDict,
00057 Istream& is
00058 )
00059 :
00060 entry(key),
00061 dictionary(parentDict, is)
00062 {
00063 name() += "::" + key;
00064
00065 is.fatalCheck
00066 (
00067 "dictionaryEntry::dictionaryEntry"
00068 "(const keyType&, const dictionary& parentDict, Istream&)"
00069 );
00070 }
00071
00072
00073
00074
00075 void Foam::dictionaryEntry::write(Ostream& os) const
00076 {
00077
00078 os.indent();
00079 os.write(keyword());
00080 dictionary::write(os);
00081 }
00082
00083
00084
00085
00086 Foam::Ostream& Foam::operator<<(Ostream& os, const dictionaryEntry& de)
00087 {
00088 de.write(os);
00089 return os;
00090 }
00091
00092
00093 #if defined (__GNUC__)
00094 template<>
00095 #endif
00096 Foam::Ostream& Foam::operator<<
00097 (
00098 Ostream& os,
00099 const InfoProxy<dictionaryEntry>& ip
00100 )
00101 {
00102 const dictionaryEntry& e = ip.t_;
00103
00104 os << " dictionaryEntry '" << e.keyword() << "'" << endl;
00105
00106 return os;
00107 }
00108
00109
00110
Copyright © 2000-2009 OpenCFD Ltd