mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
*** empty log message ***
This commit is contained in:
parent
d15ab3c91b
commit
bc6c00928c
61
direct/src/dcparse/dcField.cxx
Normal file
61
direct/src/dcparse/dcField.cxx
Normal file
@ -0,0 +1,61 @@
|
||||
// Filename: dcField.cxx
|
||||
// Created by: drose (11Oct00)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dcField.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::get_number
|
||||
// Access: Public
|
||||
// Description: Returns a unique index number associated with this
|
||||
// field. This is defined implicitly when the .dc
|
||||
// file(s) are read.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int DCField::
|
||||
get_number() const {
|
||||
return _number;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::get_name
|
||||
// Access: Public
|
||||
// Description: Returns the name of this field.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const string &DCField::
|
||||
get_name() const {
|
||||
return _name;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_atomic_field
|
||||
// Access: Public, Virtual
|
||||
// Description: Returns the same field pointer converted to an atomic
|
||||
// field pointer, if this is in fact an atomic field;
|
||||
// otherwise, returns NULL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
DCAtomicField *DCField::
|
||||
as_atomic_field() {
|
||||
return (DCAtomicField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_molecular_field
|
||||
// Access: Public, Virtual
|
||||
// Description: Returns the same field pointer converted to a
|
||||
// molecular field pointer, if this is in fact a
|
||||
// molecular field; otherwise, returns NULL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
DCMolecularField *DCField::
|
||||
as_molecular_field() {
|
||||
return (DCMolecularField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::Destructor
|
||||
// Access: Public, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
DCField::
|
||||
~DCField() {
|
||||
}
|
36
direct/src/dcparse/dcField.h
Normal file
36
direct/src/dcparse/dcField.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Filename: dcField.h
|
||||
// Created by: drose (11Oct00)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef DCFIELD_H
|
||||
#define DCFIELD_H
|
||||
|
||||
#include "dcbase.h"
|
||||
|
||||
class DCAtomicField;
|
||||
class DCMolecularField;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : DCField
|
||||
// Description : A single field of a Distributed Class, either atomic
|
||||
// or molecular.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class DCField {
|
||||
PUBLISHED:
|
||||
int get_number() const;
|
||||
const string &get_name() const;
|
||||
|
||||
virtual DCAtomicField *as_atomic_field();
|
||||
virtual DCMolecularField *as_molecular_field();
|
||||
|
||||
public:
|
||||
virtual ~DCField();
|
||||
virtual void write(ostream &out, int indent_level = 0) const=0;
|
||||
|
||||
public:
|
||||
int _number;
|
||||
string _name;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user