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

User Struct Reference

#include <infolines.h>

Inheritance diagram for User:

Inheritance graph
[legend]
Collaboration diagram for User:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 User ()
virtual operator const char * () const

Protected Attributes

char * _infoLine

Constructor & Destructor Documentation

User::User  ) 
 

Definition at line 240 of file platfDepend.cxx.

References InfoLine::_infoLine, and gethostname().

00241 {
00242 
00243 //#if defined(linux) || defined(sun) || defined(__SUNPRO_CC)
00244 #if defined(linux) 
00245   char host[100]; 
00246   gethostname(host,31);
00247   struct passwd *pwr=getpwuid(getuid());
00248   if (pwr==NULL)
00249   {
00250     _infoLine= new char[40];
00251      strcpy(_infoLine, "# User         : unknown \n");
00252      return;
00253   }
00254 
00255   _infoLine= new char[strlen(pwr->pw_name)+strlen(pwr->pw_gecos)+130];
00256   sprintf(_infoLine,"# User         : %s@%s (%s) \n",
00257                       pwr->pw_name,host,pwr->pw_gecos);
00258 #elif defined(_MSC_VER)
00259   _infoLine= new char[40];
00260   strcpy(_infoLine, "# User         : unknown \n");
00261 #else
00262   _infoLine= new char[40];
00263   strcpy(_infoLine, "# User         : unknown \n");
00264 #endif
00265 }

Here is the call graph for this function:


Member Function Documentation

virtual InfoLine::operator const char *  )  const [inline, virtual, inherited]
 

Definition at line 79 of file infolines.h.

References InfoLine::_infoLine.

00079 { return _infoLine; }


Member Data Documentation

char* InfoLine::_infoLine [protected, inherited]
 

Definition at line 75 of file infolines.h.

Referenced by CmdLine::CmdLine(), ExecLocation::ExecLocation(), InfoLine::InfoLine(), InfoLine::operator const char *(), Platform::Platform(), TimeStamp::TimeStamp(), User(), UserHomeDir::UserHomeDir(), and InfoLine::~InfoLine().


The documentation for this struct was generated from the following files:
Generated on Mon Apr 25 01:16:10 2005 for Parquete by doxygen 1.3.2