mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
*** empty log message ***
This commit is contained in:
parent
1db4b6f510
commit
8e2aa51d68
@ -144,25 +144,14 @@ is_clrecv() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: DCAtomicField::is_aisend
|
// Function: DCAtomicField::is_ownsend
|
||||||
// Access: Public
|
// Access: Public
|
||||||
// Description: Returns true if the "aisend" flag is set for this
|
// Description: Returns true if the "ownsend" flag is set for this
|
||||||
// field, false otherwise.
|
// field, false otherwise.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool DCAtomicField::
|
bool DCAtomicField::
|
||||||
is_aisend() const {
|
is_ownsend() const {
|
||||||
return (_flags & F_aisend) != 0;
|
return (_flags & F_ownsend) != 0;
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: DCAtomicField::is_airecv
|
|
||||||
// Access: Public
|
|
||||||
// Description: Returns true if the "airecv" flag is set for this
|
|
||||||
// field, false otherwise.
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
bool DCAtomicField::
|
|
||||||
is_airecv() const {
|
|
||||||
return (_flags & F_airecv) != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -219,11 +208,8 @@ write(ostream &out, int indent_level) const {
|
|||||||
if ((_flags & F_clrecv) != 0) {
|
if ((_flags & F_clrecv) != 0) {
|
||||||
out << " clrecv";
|
out << " clrecv";
|
||||||
}
|
}
|
||||||
if ((_flags & F_aisend) != 0) {
|
if ((_flags & F_ownsend) != 0) {
|
||||||
out << " aisend";
|
out << " ownsend";
|
||||||
}
|
|
||||||
if ((_flags & F_airecv) != 0) {
|
|
||||||
out << " airecv";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out << "; // field " << _number << "\n";
|
out << "; // field " << _number << "\n";
|
||||||
|
@ -34,8 +34,7 @@ PUBLISHED:
|
|||||||
bool is_db() const;
|
bool is_db() const;
|
||||||
bool is_clsend() const;
|
bool is_clsend() const;
|
||||||
bool is_clrecv() const;
|
bool is_clrecv() const;
|
||||||
bool is_aisend() const;
|
bool is_ownsend() const;
|
||||||
bool is_airecv() const;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DCAtomicField();
|
DCAtomicField();
|
||||||
@ -61,8 +60,7 @@ public:
|
|||||||
F_db = 0x0010,
|
F_db = 0x0010,
|
||||||
F_clsend = 0x0020,
|
F_clsend = 0x0020,
|
||||||
F_clrecv = 0x0040,
|
F_clrecv = 0x0040,
|
||||||
F_aisend = 0x0080,
|
F_ownsend = 0x0080,
|
||||||
F_airecv = 0x0100
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int _flags; // A bitmask union of any of the above values.
|
int _flags; // A bitmask union of any of the above values.
|
||||||
|
@ -323,6 +323,31 @@ REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?)
|
|||||||
return KW_STRING;
|
return KW_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"blob" {
|
||||||
|
accept();
|
||||||
|
return KW_BLOB;
|
||||||
|
}
|
||||||
|
|
||||||
|
"int16array" {
|
||||||
|
accept();
|
||||||
|
return KW_INT16ARRAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
"int32array" {
|
||||||
|
accept();
|
||||||
|
return KW_INT32ARRAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
"uint16array" {
|
||||||
|
accept();
|
||||||
|
return KW_UINT16ARRAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
"uint32array" {
|
||||||
|
accept();
|
||||||
|
return KW_UINT32ARRAY;
|
||||||
|
}
|
||||||
|
|
||||||
mol[0-9]+ {
|
mol[0-9]+ {
|
||||||
// A molecular keyword.
|
// A molecular keyword.
|
||||||
accept();
|
accept();
|
||||||
@ -366,14 +391,9 @@ mol[0-9]+ {
|
|||||||
return KW_CLRECV;
|
return KW_CLRECV;
|
||||||
}
|
}
|
||||||
|
|
||||||
"aisend" {
|
"ownsend" {
|
||||||
accept();
|
accept();
|
||||||
return KW_AISEND;
|
return KW_OWNSEND;
|
||||||
}
|
|
||||||
|
|
||||||
"airecv" {
|
|
||||||
accept();
|
|
||||||
return KW_AIRECV;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{INTEGERNUM} {
|
{INTEGERNUM} {
|
||||||
|
@ -57,6 +57,11 @@ dc_cleanup_parser() {
|
|||||||
%token KW_UINT64
|
%token KW_UINT64
|
||||||
%token KW_FLOAT64
|
%token KW_FLOAT64
|
||||||
%token KW_STRING
|
%token KW_STRING
|
||||||
|
%token KW_BLOB
|
||||||
|
%token KW_INT16ARRAY
|
||||||
|
%token KW_INT32ARRAY
|
||||||
|
%token KW_UINT16ARRAY
|
||||||
|
%token KW_UINT32ARRAY
|
||||||
|
|
||||||
%token KW_MOL
|
%token KW_MOL
|
||||||
|
|
||||||
@ -67,8 +72,7 @@ dc_cleanup_parser() {
|
|||||||
%token KW_DB
|
%token KW_DB
|
||||||
%token KW_CLSEND
|
%token KW_CLSEND
|
||||||
%token KW_CLRECV
|
%token KW_CLRECV
|
||||||
%token KW_AISEND
|
%token KW_OWNSEND
|
||||||
%token KW_AIRECV
|
|
||||||
|
|
||||||
%type <u.dclass> dclass_name
|
%type <u.dclass> dclass_name
|
||||||
%type <u.atomic> atomic_name
|
%type <u.atomic> atomic_name
|
||||||
@ -228,6 +232,26 @@ type_token:
|
|||||||
| KW_STRING
|
| KW_STRING
|
||||||
{
|
{
|
||||||
$$ = ST_string;
|
$$ = ST_string;
|
||||||
|
}
|
||||||
|
| KW_BLOB
|
||||||
|
{
|
||||||
|
$$ = ST_blob;
|
||||||
|
}
|
||||||
|
| KW_INT16ARRAY
|
||||||
|
{
|
||||||
|
$$ = ST_int16array;
|
||||||
|
}
|
||||||
|
| KW_INT32ARRAY
|
||||||
|
{
|
||||||
|
$$ = ST_int32array;
|
||||||
|
}
|
||||||
|
| KW_UINT16ARRAY
|
||||||
|
{
|
||||||
|
$$ = ST_uint16array;
|
||||||
|
}
|
||||||
|
| KW_UINT32ARRAY
|
||||||
|
{
|
||||||
|
$$ = ST_uint32array;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -261,13 +285,9 @@ atomic_flags:
|
|||||||
{
|
{
|
||||||
current_atomic->_flags |= DCAtomicField::F_clrecv;
|
current_atomic->_flags |= DCAtomicField::F_clrecv;
|
||||||
}
|
}
|
||||||
| atomic_flags KW_AISEND
|
| atomic_flags KW_OWNSEND
|
||||||
{
|
{
|
||||||
current_atomic->_flags |= DCAtomicField::F_aisend;
|
current_atomic->_flags |= DCAtomicField::F_ownsend;
|
||||||
}
|
|
||||||
| atomic_flags KW_AIRECV
|
|
||||||
{
|
|
||||||
current_atomic->_flags |= DCAtomicField::F_airecv;
|
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -37,6 +37,21 @@ operator << (ostream &out, DCSubatomicType type) {
|
|||||||
|
|
||||||
case ST_string:
|
case ST_string:
|
||||||
return out << "string";
|
return out << "string";
|
||||||
|
|
||||||
|
case ST_blob:
|
||||||
|
return out << "blob";
|
||||||
|
|
||||||
|
case ST_int16array:
|
||||||
|
return out << "int16array";
|
||||||
|
|
||||||
|
case ST_int32array:
|
||||||
|
return out << "int32array";
|
||||||
|
|
||||||
|
case ST_uint16array:
|
||||||
|
return out << "uint16array";
|
||||||
|
|
||||||
|
case ST_uint32array:
|
||||||
|
return out << "uint32array";
|
||||||
}
|
}
|
||||||
|
|
||||||
return out << "invalid type: " << (int)type;
|
return out << "invalid type: " << (int)type;
|
||||||
|
@ -29,7 +29,12 @@ enum DCSubatomicType {
|
|||||||
|
|
||||||
ST_float64,
|
ST_float64,
|
||||||
|
|
||||||
ST_string,
|
ST_string, // a human-printable string
|
||||||
|
ST_blob, // any variable length message, stored as a string
|
||||||
|
ST_int16array,
|
||||||
|
ST_int32array,
|
||||||
|
ST_uint16array,
|
||||||
|
ST_uint32array,
|
||||||
};
|
};
|
||||||
END_PUBLISH
|
END_PUBLISH
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user