00001 // Filename: dcField.h 00002 // Created by: drose (11Oct00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef DCFIELD_H 00020 #define DCFIELD_H 00021 00022 #include "dcbase.h" 00023 00024 class DCAtomicField; 00025 class DCMolecularField; 00026 class HashGenerator; 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : DCField 00030 // Description : A single field of a Distributed Class, either atomic 00031 // or molecular. 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_DIRECT DCField { 00034 PUBLISHED: 00035 int get_number() const; 00036 const string &get_name() const; 00037 00038 virtual DCAtomicField *as_atomic_field(); 00039 virtual DCMolecularField *as_molecular_field(); 00040 00041 public: 00042 virtual ~DCField(); 00043 virtual void write(ostream &out, int indent_level = 0) const=0; 00044 virtual void generate_hash(HashGenerator &hash) const; 00045 00046 public: 00047 int _number; 00048 string _name; 00049 }; 00050 00051 #endif