Panda3D
writableParam.h
1 // Filename: writableParam.h
2 // Created by: jason (13Jun00)
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 #ifndef WRITABLEPARAM_H
16 #define WRITABLEPARAM_H
17 
18 #include "pandabase.h"
19 
20 #include "factoryParam.h"
21 #include "datagram.h"
22 
23 #include "pvector.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : WritableParam
27 // Description : The specific derivation of FactoryParam that
28 // contains the information needed by a TypedWritable
29 // object. Simply contains a Datagram for the object
30 // to construct itself from.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDA_PUTIL WritableParam : public FactoryParam {
33 public:
34  INLINE const Datagram &get_datagram();
35 
36 private:
37  const Datagram &_packet;
38 
39 public:
40  INLINE WritableParam(const Datagram &datagram);
41  INLINE WritableParam(const WritableParam &other);
42  INLINE ~WritableParam();
43 
44 private:
45  // The assignment operator cannot be used for this class.
46  INLINE void operator = (const WritableParam &other);
47 
48 public:
49  virtual TypeHandle get_type() const {
50  return get_class_type();
51  }
52  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
53  static TypeHandle get_class_type() {
54  return _type_handle;
55  }
56  static void init_type() {
57  FactoryParam::init_type();
58  register_type(_type_handle, "WritableParam",
59  FactoryParam::get_class_type());
60  }
61 
62 private:
63  static TypeHandle _type_handle;
64 };
65 
66 #include "writableParam.I"
67 
68 #endif
69 
The specific derivation of FactoryParam that contains the information needed by a TypedWritable objec...
Definition: writableParam.h:32
The base class of any number of specific pieces of parameter information that might be passed to a Fa...
Definition: factoryParam.h:34
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition: datagram.h:43