00001 // Filename: xFileDataNode.I00002 // Created by: drose (08Oct04)00003 //00004 ////////////////////////////////////////////////////////////////////00005 //00006 // PANDA 3D SOFTWARE00007 // Copyright (c) Carnegie Mellon University. All rights reserved.00008 //00009 // All use of this software is subject to the terms of the revised BSD00010 // license. You should have received a copy of this license along00011 // with this source code in a file named "LICENSE."00012 //00013 ////////////////////////////////////////////////////////////////////00014
00015
00016 ////////////////////////////////////////////////////////////////////00017 // Function: XFileDataNode::get_data_child00018 // Access: Public00019 // Description: Since the children of an XFileDataNode are00020 // syntactically constrained to themselves be00021 // XFileDataNodes, this is a convenience function that00022 // returns the same thing as XFileNode::get_child(), but00023 // it is cast to a type XFileDataNode and dereferenced.00024 ////////////////////////////////////////////////////////////////////00025 INLINE constXFileDataNode &XFileDataNode::00026get_data_child(int n) const {
00027 return *DCAST(XFileDataNode, get_child(n));
00028 }
00029
00030
00031 ////////////////////////////////////////////////////////////////////00032 // Function: XFileDataNode::get_template00033 // Access: Public00034 // Description: Returns the template used to define this data object.00035 // Since the only classes to inherit from XFileDataNode00036 // are XFileDataNodeTemplate and XFileDataNodeReference,00037 // both of which represent a class that is defined by a00038 // template, it makes sense to put this common method00039 // here in the base class.00040 ////////////////////////////////////////////////////////////////////00041 INLINE XFileTemplate *XFileDataNode::00042get_template() const {
00043 return _template;
00044 }
00045
00046 ////////////////////////////////////////////////////////////////////00047 // Function: XFileDataNode::get_template_name00048 // Access: Public00049 // Description: A convenience function to return the name of the00050 // template used to define this data object.00051 ////////////////////////////////////////////////////////////////////00052 INLINE conststring &XFileDataNode::00053get_template_name() const {
00054 return _template->get_name();
00055 }
00056