83 lines
2.3 KiB
C++
83 lines
2.3 KiB
C++
// Filename: eggTable.h
|
|
// Created by: drose (19Feb99)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
|
|
//
|
|
// All use of this software is subject to the terms of the Panda 3d
|
|
// Software license. You should have received a copy of this license
|
|
// along with this source code; you will also find a current copy of
|
|
// the license at http://www.panda3d.org/license.txt .
|
|
//
|
|
// To contact the maintainers of this program write to
|
|
// panda3d@yahoogroups.com .
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef EGGTABLE_H
|
|
#define EGGTABLE_H
|
|
|
|
#include <pandabase.h>
|
|
|
|
#include "eggGroupNode.h"
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Class : EggTable
|
|
// Description : This corresponds to a <Table> or a <Bundle> entry.
|
|
// As such, it doesn't actually contain a table of
|
|
// numbers, but it may be a parent to an EggSAnimData or
|
|
// an EggXfmAnimData, which do. It may also be a parent
|
|
// to another <Table> or <Bundle>, establishing a
|
|
// hierarchy of tables.
|
|
////////////////////////////////////////////////////////////////////
|
|
class EXPCL_PANDAEGG EggTable : public EggGroupNode {
|
|
public:
|
|
enum TableType {
|
|
TT_invalid,
|
|
TT_table,
|
|
TT_bundle,
|
|
};
|
|
|
|
INLINE EggTable(const string &name = "");
|
|
INLINE EggTable(const EggTable ©);
|
|
INLINE EggTable &operator = (const EggTable ©);
|
|
|
|
INLINE void set_table_type(TableType type);
|
|
INLINE TableType get_table_type() const;
|
|
|
|
virtual void write(ostream &out, int indent_level) const;
|
|
|
|
static TableType string_table_type(const string &string);
|
|
|
|
private:
|
|
TableType _type;
|
|
|
|
|
|
public:
|
|
|
|
static TypeHandle get_class_type() {
|
|
return _type_handle;
|
|
}
|
|
static void init_type() {
|
|
EggGroupNode::init_type();
|
|
register_type(_type_handle, "EggTable",
|
|
EggGroupNode::get_class_type());
|
|
}
|
|
virtual TypeHandle get_type() const {
|
|
return get_class_type();
|
|
}
|
|
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
|
|
|
private:
|
|
static TypeHandle _type_handle;
|
|
};
|
|
|
|
ostream &operator << (ostream &out, EggTable::TableType t);
|
|
|
|
#include "eggTable.I"
|
|
|
|
#endif
|
|
|