This is Unofficial EPICS BASE Doxygen Site
localHostName.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /*
11  *
12  * L O S A L A M O S
13  * Los Alamos National Laboratory
14  * Los Alamos, New Mexico 87545
15  *
16  * Copyright, 1986, The Regents of the University of California.
17  *
18  * Author: Jeff Hill
19  */
20 
21 #ifndef INC_localHostName_H
22 #define INC_localHostName_H
23 
24 #include <string.h>
25 
26 #include "epicsSingleton.h"
27 
29 public:
30  localHostName ();
31  ~localHostName ();
32  const char * pointer () const;
33  unsigned getName ( char * pBuf, unsigned bufLength ) const;
34  unsigned nameLength () const;
35 private:
36  bool attachedToSockLib;
37  unsigned length;
38  char cache [128];
39 };
40 
42 
43 inline unsigned localHostName::nameLength () const
44 {
45  return this->length;
46 }
47 
48 inline const char * localHostName::pointer () const
49 {
50  return this->cache;
51 }
52 
53 #endif // ifndef INC_localHostName_H
54 
55 
const char * pointer() const
Definition: localHostName.h:48
unsigned nameLength() const
Definition: localHostName.h:43
epicsSingleton< localHostName > localHostNameCache
unsigned getName(char *pBuf, unsigned bufLength) const