open_toontown_panda3d/direct/src/dcparser/dcKeyword.h

60 lines
1.8 KiB
C++

// Filename: dcKeyword.h
// Created by: drose (22Jul05)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) 2001 - 2004, 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://etc.cmu.edu/panda3d/docs/license/ .
//
// To contact the maintainers of this program write to
// panda3d-general@lists.sourceforge.net .
//
////////////////////////////////////////////////////////////////////
#ifndef DCKEYWORD_H
#define DCKEYWORD_H
#include "dcbase.h"
#include "dcDeclaration.h"
class DCParameter;
class HashGenerator;
////////////////////////////////////////////////////////////////////
// Class : DCKeyword
// Description : This represents a single keyword declaration in the
// dc file. It is used to define a communication
// property associated with a field, for instance
// "broadcast" or "airecv".
////////////////////////////////////////////////////////////////////
class EXPCL_DIRECT DCKeyword : public DCDeclaration {
public:
DCKeyword(const string &name, int historical_flag = ~0);
virtual ~DCKeyword();
PUBLISHED:
const string &get_name() const;
public:
int get_historical_flag() const;
void clear_historical_flag();
virtual void output(ostream &out, bool brief) const;
virtual void write(ostream &out, bool brief, int indent_level) const;
void generate_hash(HashGenerator &hashgen) const;
private:
const string _name;
// This flag is only kept for historical reasons, so we can preserve
// the file's hash code if no new flags are in use.
int _historical_flag;
};
#endif