Main Page ? Class Hierarchy ? Compound List ? File List ? Compound Members ? File Members ?

FragmentHandle Class Reference

#include <cmt_fragment.h>

Collaboration diagram for FragmentHandle:

[legend]
List of all members.

Public Methods

? FragmentHandle ()
? FragmentHandle (const cmt_string name)
FragmentHandle &? operator= (const FragmentHandle &other)
void? reset ()
void? set (const cmt_string name)
cmt_string &? name ()
cmt_string &? suffix ()
cmt_string &? header ()
cmt_string &? trailer ()
bool? need_dependencies ()
bool? copy (FILE *out, int variables,...)
bool? copy (cmt_string &out, int variables,...)
bool? wincopy (FILE *out, int variables,...)
bool? wincopy (cmt_string &out, int variables,...)
bool? copy (FILE *out, const Variable::VariableVector &vector, int variables,...)
bool? copy (cmt_string &out, const Variable::VariableVector &vector, int variables,...)
bool? wincopy (FILE *out, const Variable::VariableVector &vector, int variables,...)
bool? wincopy (cmt_string &out, const Variable::VariableVector &vector, int variables,...)

Private Methods

bool? setup ()

Private Attributes

Fragment *? _fragment
cmt_string? _name
bool? _initialized

Constructor & Destructor Documentation

FragmentHandle::FragmentHandle (? ? )?
?

Definition at line 1015 of file cmt_fragment.cxx.

References _fragment, and _initialized.

01016 {
01017   _fragment = 0;
01018   _initialized = false;
01019 }

FragmentHandle::FragmentHandle (? const cmt_string? ? name )?
?

Definition at line 1022 of file cmt_fragment.cxx.

References _fragment, and _initialized.

01022                                                      : _name(name)
01023 {
01024   _fragment = 0;
01025   _initialized = false;
01026 }

Member Function Documentation

bool FragmentHandle::copy (? cmt_string &? ? out,
const Variable::VariableVector &? ? vector,
int? ? variables,
...? ?
)?
?

Definition at line 1205 of file cmt_fragment.cxx.

References _fragment, _name, Fragment::copy(), and setup().

01206 {
01207   if (!setup ()) return (false);
01208 
01209   va_list ids;
01210 
01211   va_start (ids, variables);
01212   bool result = _fragment->copy (out, vector, variables, ids);
01213   va_end (ids);
01214 
01215   if (!result)
01216     {
01217       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01218       _fragment = 0;
01219     }
01220 
01221   return (result);
01222 }

bool FragmentHandle::copy (? FILE *? ? out,
const Variable::VariableVector &? ? vector,
int? ? variables,
...? ?
)?
?

Definition at line 1185 of file cmt_fragment.cxx.

References _fragment, _name, Fragment::copy(), and setup().

01186 {
01187   if (!setup ()) return (false);
01188 
01189   va_list ids;
01190 
01191   va_start (ids, variables);
01192   bool result = _fragment->copy (out, vector, variables, ids);
01193   va_end (ids);
01194 
01195   if (!result)
01196     {
01197       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01198       _fragment = 0;
01199     }
01200 
01201   return (result);
01202 }

bool FragmentHandle::copy (? cmt_string &? ? out,
int? ? variables,
...? ?
)?
?

Definition at line 1122 of file cmt_fragment.cxx.

References _fragment, _name, Fragment::copy(), and setup().

01123 {
01124   if (!setup ()) return (false);
01125 
01126   va_list ids;
01127 
01128   va_start (ids, variables);
01129   bool result = _fragment->copy (out, variables, ids);
01130   va_end (ids);
01131 
01132   if (!result)
01133     {
01134       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01135       _fragment = 0;
01136     }
01137 
01138   return (result);
01139 }

bool FragmentHandle::copy (? FILE *? ? out,
int? ? variables,
...? ?
)?
?

Definition at line 1102 of file cmt_fragment.cxx.

References _fragment, _name, Fragment::copy(), and setup().

Referenced by ConstituentsMakefileGenerator::build(), MakeSetupGenerator::build(), ReadmeGenerator::build(), DocumentGenerator::build(), LibraryGenerator::build(), CmtModel::expand(), LibraryGenerator::java_file_action(), LibraryGenerator::module_file_action(), LibraryGenerator::proto_file_action(), and CmtModel::strict_expand().

01103 {
01104   if (!setup ()) return (false);
01105 
01106   va_list ids;
01107 
01108   va_start (ids, variables);
01109   bool result = _fragment->copy (out, variables, ids);
01110   va_end (ids);
01111 
01112   if (!result)
01113     {
01114       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01115       _fragment = 0;
01116     }
01117 
01118   return (result);
01119 }

cmt_string & FragmentHandle::header (? ? )?
?

Definition at line 1074 of file cmt_fragment.cxx.

References _fragment, Fragment::header, and setup().

Referenced by DocumentGenerator::build().

01075 {
01076   static cmt_string null_string;
01077 
01078   if (!setup ()) return (null_string);
01079 
01080   return (_fragment->header);
01081 }

cmt_string & FragmentHandle::name (? ? )?
?

Definition at line 1054 of file cmt_fragment.cxx.

References _fragment, Fragment::name, and setup().

Referenced by DocumentGenerator::build().

01055 {
01056   static cmt_string null_string;
01057 
01058   if (!setup ()) return (null_string);
01059 
01060   return (_fragment->name);
01061 }

bool FragmentHandle::need_dependencies (? ? )?
?

Definition at line 1094 of file cmt_fragment.cxx.

References _fragment, Fragment::need_dependencies, and setup().

Referenced by DocumentGenerator::build().

01095 {
01096   if (!setup ()) return (false);
01097 
01098   return (_fragment->need_dependencies);
01099 }

FragmentHandle & FragmentHandle::operator= (? const FragmentHandle &? ? other )?
?

Definition at line 1029 of file cmt_fragment.cxx.

References _fragment, _initialized, and _name.

01030 {
01031   _name = other._name;
01032   _fragment = 0;
01033   _initialized = false;
01034 
01035   return (*this);
01036 }

void FragmentHandle::reset (? ? )?
?

Definition at line 1039 of file cmt_fragment.cxx.

References _fragment, and _initialized.

Referenced by ConstituentsMakefileGenerator::reset(), MakeSetupGenerator::reset(), MSDEVGenerator::reset(), ReadmeGenerator::reset(), DocumentGenerator::reset(), LibraryGenerator::reset(), and AnyDocumentGenerator::reset().

01040 {
01041   _fragment = 0;
01042   _initialized = false;
01043 }

void FragmentHandle::set (? const cmt_string? ? name )?
?

Definition at line 1046 of file cmt_fragment.cxx.

References _fragment, _initialized, and _name.

Referenced by AnyDocumentGenerator::AnyDocumentGenerator(), ConstituentsMakefileGenerator::ConstituentsMakefileGenerator(), DocumentGenerator::DocumentGenerator(), LibraryGenerator::LibraryGenerator(), MakeSetupGenerator::MakeSetupGenerator(), MSDEVGenerator::MSDEVGenerator(), ReadmeGenerator::ReadmeGenerator(), Language::setup_fragments(), and VSNETGenerator::VSNETGenerator().

01047 {
01048   _name = name;
01049   _fragment = 0;
01050   _initialized = false;
01051 }

bool FragmentHandle::setup (? ? )? [private]
?

Definition at line 1267 of file cmt_fragment.cxx.

References _fragment, _initialized, _name, and Fragment::find().

Referenced by copy(), header(), name(), need_dependencies(), suffix(), trailer(), and wincopy().

01268 {
01269   if (!_initialized)
01270     {
01271       _initialized = true;
01272 
01273       _fragment = Fragment::find (_name);
01274       if (_fragment == 0)
01275         {
01276           cerr << "#CMT> Fragment " << _name << " not found" << endl;
01277         }
01278     }
01279 
01280   if (_fragment == 0)
01281     {
01282       return (false);
01283     }
01284   else
01285     {
01286       return (true);
01287     }
01288 }

cmt_string & FragmentHandle::suffix (? ? )?
?

Definition at line 1064 of file cmt_fragment.cxx.

References _fragment, setup(), and Fragment::suffix.

Referenced by DocumentGenerator::build().

01065 {
01066   static cmt_string null_string;
01067 
01068   if (!setup ()) return (null_string);
01069 
01070   return (_fragment->suffix);
01071 }

cmt_string & FragmentHandle::trailer (? ? )?
?

Definition at line 1084 of file cmt_fragment.cxx.

References _fragment, setup(), and Fragment::trailer.

Referenced by DocumentGenerator::build().

01085 {
01086   static cmt_string null_string;
01087 
01088   if (!setup ()) return (null_string);
01089 
01090   return (_fragment->trailer);
01091 }

bool FragmentHandle::wincopy (? cmt_string &? ? out,
const Variable::VariableVector &? ? vector,
int? ? variables,
...? ?
)?
?

Definition at line 1245 of file cmt_fragment.cxx.

References _fragment, _name, setup(), and Fragment::wincopy().

01248 {
01249   if (!setup ()) return (false);
01250 
01251   va_list ids;
01252 
01253   va_start (ids, variables);
01254   bool result = _fragment->wincopy (out, vector, variables, ids);
01255   va_end (ids);
01256 
01257   if (!result)
01258     {
01259       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01260       _fragment = 0;
01261     }
01262 
01263   return (result);
01264 }

bool FragmentHandle::wincopy (? FILE *? ? out,
const Variable::VariableVector &? ? vector,
int? ? variables,
...? ?
)?
?

Definition at line 1225 of file cmt_fragment.cxx.

References _fragment, _name, setup(), and Fragment::wincopy().

01226 {
01227   if (!setup ()) return (false);
01228 
01229   va_list ids;
01230 
01231   va_start (ids, variables);
01232   bool result = _fragment->wincopy (out, vector, variables, ids);
01233   va_end (ids);
01234 
01235   if (!result)
01236     {
01237       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01238       _fragment = 0;
01239     }
01240 
01241   return (result);
01242 }

bool FragmentHandle::wincopy (? cmt_string &? ? out,
int? ? variables,
...? ?
)?
?

Definition at line 1162 of file cmt_fragment.cxx.

References _fragment, _name, setup(), and Fragment::wincopy().

01163 {
01164   if (!setup ()) return (false);
01165 
01166   va_list ids;
01167 
01168   va_start (ids, variables);
01169   bool result = _fragment->wincopy (out, variables, ids);
01170   va_end (ids);
01171 
01172   if (!result)
01173     {
01174       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01175       _fragment = 0;
01176     }
01177 
01178   return (result);
01179 }

bool FragmentHandle::wincopy (? FILE *? ? out,
int? ? variables,
...? ?
)?
?

Definition at line 1142 of file cmt_fragment.cxx.

References _fragment, _name, setup(), and Fragment::wincopy().

01143 {
01144   if (!setup ()) return (false);
01145 
01146   va_list ids;
01147 
01148   va_start (ids, variables);
01149   bool result = _fragment->wincopy (out, variables, ids);
01150   va_end (ids);
01151 
01152   if (!result)
01153     {
01154       cerr << "#CMT> Fragment " << _name << " not found" << endl;
01155       _fragment = 0;
01156     }
01157 
01158   return (result);
01159 }

Member Data Documentation

Fragment* FragmentHandle::_fragment [private]
?

Definition at line 135 of file cmt_fragment.h.

Referenced by copy(), FragmentHandle(), header(), name(), need_dependencies(), operator=(), reset(), set(), setup(), suffix(), trailer(), and wincopy().

bool FragmentHandle::_initialized [private]
?

Definition at line 137 of file cmt_fragment.h.

Referenced by FragmentHandle(), operator=(), reset(), set(), and setup().

cmt_string FragmentHandle::_name [private]
?

Definition at line 136 of file cmt_fragment.h.

Referenced by copy(), operator=(), set(), setup(), and wincopy().


The documentation for this class was generated from the following files:
Generated on Wed Sep 1 11:00:21 2004 for CMT by 1.2.18