Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dtool/src/interrogate/functionWriter.cxx

Go to the documentation of this file.
00001 // Filename: functionWriter.cxx
00002 // Created by:  drose (14Sep01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "functionWriter.h"
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //     Function: FunctionWriter::Constructor
00023 //       Access: Public
00024 //  Description:
00025 ////////////////////////////////////////////////////////////////////
00026 FunctionWriter::
00027 FunctionWriter() {
00028 }
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //     Function: FunctionWriter::Destructor
00032 //       Access: Public, Virtual
00033 //  Description:
00034 ////////////////////////////////////////////////////////////////////
00035 FunctionWriter::
00036 ~FunctionWriter() {
00037 }
00038 
00039 ////////////////////////////////////////////////////////////////////
00040 //     Function: FunctionWriter::get_name
00041 //       Access: Public
00042 //  Description:
00043 ////////////////////////////////////////////////////////////////////
00044 const string &FunctionWriter::
00045 get_name() const {
00046   return _name;
00047 }
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: FunctionWriter::compare_to
00051 //       Access: Public, Virtual
00052 //  Description:
00053 ////////////////////////////////////////////////////////////////////
00054 int FunctionWriter::
00055 compare_to(const FunctionWriter &other) const {
00056   // Lexicographical string comparison.
00057 
00058   string::const_iterator n1, n2;
00059   n1 = _name.begin();
00060   n2 = other._name.begin();
00061   while (n1 != _name.end() && n2 != other._name.end()) {
00062     if (*n1 != *n2) {
00063       return *n1 - *n2;
00064     }
00065     ++n1;
00066     ++n2;
00067   }
00068   if (n1 != _name.end()) {
00069     return -1;
00070   }
00071   if (n2 != other._name.end()) {
00072     return 1;
00073   }
00074   return 0;
00075 }
00076 
00077 ////////////////////////////////////////////////////////////////////
00078 //     Function: FunctionWriter::write_prototype
00079 //       Access: Public, Virtual
00080 //  Description: Outputs the prototype for the function.
00081 ////////////////////////////////////////////////////////////////////
00082 void FunctionWriter::
00083 write_prototype(ostream &) {
00084 }
00085 
00086 ////////////////////////////////////////////////////////////////////
00087 //     Function: FunctionWriter::write_code
00088 //       Access: Public, Virtual
00089 //  Description: Outputs the code for the function.
00090 ////////////////////////////////////////////////////////////////////
00091 void FunctionWriter::
00092 write_code(ostream &) {
00093 }

Generated on Thu May 1 22:13:00 2003 for DTool by doxygen1.3