mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Make DatagramIterator typed (ask me if you want to know why)
This commit is contained in:
parent
8365c5ce13
commit
4e92e480e0
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "config_express.h"
|
#include "config_express.h"
|
||||||
#include "datagram.h"
|
#include "datagram.h"
|
||||||
|
#include "datagramIterator.h"
|
||||||
#include "nodeReferenceCount.h"
|
#include "nodeReferenceCount.h"
|
||||||
#include "referenceCount.h"
|
#include "referenceCount.h"
|
||||||
#include "textEncoder.h"
|
#include "textEncoder.h"
|
||||||
@ -99,6 +100,7 @@ init_libexpress() {
|
|||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
Datagram::init_type();
|
Datagram::init_type();
|
||||||
|
DatagramIterator::init_type();
|
||||||
Namable::init_type();
|
Namable::init_type();
|
||||||
NodeReferenceCount::init_type();
|
NodeReferenceCount::init_type();
|
||||||
ReferenceCount::init_type();
|
ReferenceCount::init_type();
|
||||||
|
@ -12,10 +12,11 @@
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
#include "datagramIterator.h"
|
#include "datagramIterator.h"
|
||||||
#include "pnotify.h"
|
#include "pnotify.h"
|
||||||
|
|
||||||
|
TypeHandle DatagramIterator::_type_handle;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: DatagramIterator::get_string
|
// Function: DatagramIterator::get_string
|
||||||
// Access: Public
|
// Access: Public
|
||||||
|
@ -28,8 +28,9 @@
|
|||||||
// know the correct type and order of each element.
|
// know the correct type and order of each element.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDAEXPRESS DatagramIterator {
|
class EXPCL_PANDAEXPRESS DatagramIterator {
|
||||||
public:
|
public:
|
||||||
INLINE void assign(Datagram &datagram, size_t offset = 0);
|
INLINE void assign(Datagram &datagram, size_t offset = 0);
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE DatagramIterator();
|
INLINE DatagramIterator();
|
||||||
INLINE DatagramIterator(const Datagram &datagram, size_t offset = 0);
|
INLINE DatagramIterator(const Datagram &datagram, size_t offset = 0);
|
||||||
@ -82,6 +83,17 @@ PUBLISHED:
|
|||||||
private:
|
private:
|
||||||
const Datagram *_datagram;
|
const Datagram *_datagram;
|
||||||
size_t _current_index;
|
size_t _current_index;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static TypeHandle get_class_type() {
|
||||||
|
return _type_handle;
|
||||||
|
}
|
||||||
|
static void init_type() {
|
||||||
|
register_type(_type_handle, "DatagramIterator");
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static TypeHandle _type_handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
// These generic functions are primarily for reading a value from a
|
// These generic functions are primarily for reading a value from a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user