Add IMD_model as a dedicated type to the mini-meta database schema language
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5376 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
0c28d0493f
commit
f31772dda3
|
@ -18,6 +18,7 @@ sub printStructFieldType
|
|||
elsif (/bool/) { $$output .= "bool "; }
|
||||
elsif (/set/) { $$output .= "bool "; }
|
||||
elsif (/enum/) { $$output .= "${$field}{\"enum\"} "; }
|
||||
elsif (/IMD_model/) { $$output .= "iIMDShape* "; }
|
||||
else { die "UKNOWN TYPE: $_"; }
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ sub parseStruct
|
|||
}
|
||||
}
|
||||
# Parse regular field declarations
|
||||
elsif (/^\s*(count|string|real|bool)\s+(unique\s+)?(\w+)\s*;\s*$/)
|
||||
elsif (/^\s*(count|string|real|bool|IMD_model)\s+(unique\s+)?(\w+)\s*;\s*$/)
|
||||
{
|
||||
my %field = (type=>$1, qualifier=>$2, name=>$3);
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ sub printStructFieldType
|
|||
elsif (/real/) { $$output .= "NUMERIC NOT NULL"; }
|
||||
elsif (/bool/) { $$output .= "INTEGER NOT NULL"; }
|
||||
elsif (/enum/) { $$output .= "INTEGER NOT NULL"; }
|
||||
elsif (/IMD_model/) { $$output .= "TEXT NOT NULL"; }
|
||||
else { die "UKNOWN TYPE: $_"; }
|
||||
}
|
||||
|
||||
|
|
|
@ -44,8 +44,7 @@ struct COMPONENT
|
|||
# We'll name it IMD_model for now.
|
||||
#
|
||||
# The "base" IMD model representing this component in 3D space.
|
||||
#### IMD_model baseModel;
|
||||
string baseModel;
|
||||
IMD_model baseModel;
|
||||
end;
|
||||
|
||||
# Will contain all data associated with a body
|
||||
|
|
Loading…
Reference in New Issue