Panda3D
bioPtr.I
1 // Filename: bioPtr.I
2 // Created by: drose (15Oct02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: BioPtr::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE BioPtr::
22 BioPtr(BIO *bio) : _bio(bio) {
23 }
24 
25 ////////////////////////////////////////////////////////////////////
26 // Function: BioPtr::operator *
27 // Access: Public
28 // Description:
29 ////////////////////////////////////////////////////////////////////
30 INLINE BIO &BioPtr::
31 operator *() const {
32  return *_bio;
33 }
34 
35 ////////////////////////////////////////////////////////////////////
36 // Function: BioPtr::operator ->
37 // Access: Public
38 // Description:
39 ////////////////////////////////////////////////////////////////////
40 INLINE BIO *BioPtr::
41 operator ->() const {
42  return _bio;
43 }
44 
45 ////////////////////////////////////////////////////////////////////
46 // Function: BioPtr::operator typecast
47 // Access: Public
48 // Description:
49 ////////////////////////////////////////////////////////////////////
50 INLINE BioPtr::
51 operator BIO * () const {
52  return _bio;
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function: BioPtr::get_bio
57 // Access: Public
58 // Description:
59 ////////////////////////////////////////////////////////////////////
60 INLINE void BioPtr::
61 set_bio(BIO *bio) {
62  _bio = bio;
63 }
64 
65 ////////////////////////////////////////////////////////////////////
66 // Function: BioPtr::get_bio
67 // Access: Public
68 // Description:
69 ////////////////////////////////////////////////////////////////////
70 INLINE BIO *BioPtr::
71 get_bio() const {
72  return _bio;
73 }
74 
75 ////////////////////////////////////////////////////////////////////
76 // Function: BioPtr::get_server_name
77 // Access: Public
78 // Description: Returns the name of the server we are (or should be)
79 // connected to.
80 ////////////////////////////////////////////////////////////////////
81 INLINE const string &BioPtr::
82 get_server_name() const {
83  return _server_name;
84 }
85 
86 ////////////////////////////////////////////////////////////////////
87 // Function: BioPtr::get_port
88 // Access: Public
89 // Description: Returns the port on which we are (or should be)
90 // connected.
91 ////////////////////////////////////////////////////////////////////
92 INLINE int BioPtr::
93 get_port() const {
94  return _port;
95 }