mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-26 17:17:03 -04:00
55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
// Filename: cppUsing.C
|
|
// Created by: drose (16Nov99)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
#include "cppUsing.h"
|
|
#include "cppIdentifier.h"
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: CPPUsing::Constructor
|
|
// Access: Public
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
CPPUsing::
|
|
CPPUsing(CPPIdentifier *ident, bool full_namespace, const CPPFile &file) :
|
|
CPPDeclaration(file),
|
|
_ident(ident), _full_namespace(full_namespace)
|
|
{
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: CPPUsing::output
|
|
// Access: Public, Virtual
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
void CPPUsing::
|
|
output(ostream &out, int, CPPScope *, bool) const {
|
|
out << "using ";
|
|
if (_full_namespace) {
|
|
out << "namespace ";
|
|
}
|
|
out << *_ident;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: CPPUsing::get_subtype
|
|
// Access: Public, Virtual
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
CPPDeclaration::SubType CPPUsing::
|
|
get_subtype() const {
|
|
return ST_using;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: CPPUsing::as_using
|
|
// Access: Public, Virtual
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
CPPUsing *CPPUsing::
|
|
as_using() {
|
|
return this;
|
|
}
|