Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Attribute.C
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: Attribute.C,v 1.29 2008/12/06 08:43:25 mtcampbe Exp $
24 
29 /* Author: Xiangmin Jiao */
30 
31 #include "Attribute.h"
32 #include "Window.h"
33 #include "Pane.h"
34 #include "roccom_assertion.h"
35 #include "commpi.h"
36 #include <cstring>
37 
38 COM_BEGIN_NAME_SPACE
39 
44  { "nc", "1-nc", "2-nc", "3-nc", "conn", "mesh",
45  "pconn", "ridges", "1-ridges", "2-ridges", "pmesh", "atts", "all" };
46 
48 const char Attribute::_keylocs[] =
49  { 'n', 'n', 'n', 'n', 'e', 'p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'};
50 
55  COM_METADATA, COM_METADATA };
56 
59  { 3, 1, 1, 1, 0, 0, 1, 2, 1, 1, 0, 0, 0 };
60 
61 //\}
62 
64  const std::string &name, int id)
65  : _pane( pane), _id(id), _gap(0), _status(0)
66 {
67  if ( !parent)
70  _name = name.size()?name:parent->name();
71 
73  Attribute *root = parent->root();
74  _loc=root->_loc; _ncomp=root->_ncomp; _type=root->_type;
75  _cap = root->_cap; _strd = root->_strd; _nbytes_strd = root->_nbytes_strd;
76  _unit=root->_unit; _nitems = root->_nitems; _ngitems = root->_ngitems;
77 }
78 
80 const Window *Attribute::window() const { return _pane->window(); }
81 
82 std::string Attribute::fullname() const
83 { return window()->name()+"."+name(); }
84 
85 const void *Attribute::get_addr( int i, int j) const throw(COM_exception) {
86  if ( _parent) return root()->get_addr( i,j);
87 
88  if ( j>=_ncomp) throw COM_exception( COM_ERR_INVALID_DIMENSION);
89 
90  if ( _ncomp>1) return this[j+1].get_addr( i);
91 
92  // Check that i is between 0 and size_of_items-1.
93  if ( i<0 || i>=size_of_items())
95  ( fullname(), Attribute::get_addr));
96  return ((char*)_ptr)+i*_nbytes_strd;
97 }
98 
99 bool Attribute::size_set() const
100 {
101  if ( _loc == 'n' && _id != COM_NC)
102  return _pane->attribute(COM_NC)->size_set();
103  else if ( _loc == 'e' && _id != COM_CONN)
104  return _pane->attribute(COM_CONN)->size_set();
105  else if ( _parent)
106  return _parent->size_set();
107  else
108  return _nitems>=0;
109 }
110 
112 {
113  if ( _pane->ignore_ghost())
114  return size_of_real_items();
115  else if ( _loc == 'n' && _id != COM_NC)
116  return _pane->attribute(COM_NC)->size_of_items();
117  else if ( _loc == 'e' && _id != COM_CONN)
119  else if ( _parent)
120  return _parent->size_of_items();
121  else
122  return _nitems<=0 ? 0 : _nitems;
123 }
124 
126 {
127  if (_pane->ignore_ghost())
128  return maxsize_of_real_items();
129  if ( _loc == 'n' && _id != COM_NC)
131  else if ( _loc == 'e' && _id != COM_CONN)
133  else if ( _parent)
134  return _parent->maxsize_of_items();
135  else
136  return capacity();
137 }
138 
140 {
141  if ( _pane->ignore_ghost())
142  return 0;
143  else if ( _loc == 'n' && _id != COM_NC)
145  else if ( _loc == 'e' && _id != COM_CONN)
147  else if ( _parent)
148  return _parent->size_of_ghost_items();
149  else
150  return _ngitems;
151 }
152 
154 {
155  if ( _pane->ignore_ghost())
156  return 0;
157  else if ( _loc == 'n' && _id != COM_NC)
159  else if ( _loc == 'e' && _id != COM_CONN)
161  else if ( _parent)
163  else
164  return _nitems<=0 ? 0 :_ngitems + (_cap-_nitems);
165 }
166 
168 {
169  if ( _loc == 'n' && _id != COM_NC)
171  else if ( _loc == 'e' && _id != COM_CONN)
173  else if ( _parent)
174  return _parent->size_of_real_items();
175  else
176  return _nitems<=0 ? 0:_nitems - _ngitems - _gap;
177 }
178 
180 {
181  if ( _loc == 'n' && _id != COM_NC)
183  else if ( _loc == 'e' && _id != COM_CONN)
185  else if ( _parent)
186  return _parent->maxsize_of_real_items();
187  else
188  return _nitems<=0 ? 0 : _nitems - _ngitems;
189 }
190 
191 void Attribute::set_size( int nitems, int ngitems) throw(COM_exception)
192 {
193  if ( _parent)
195  append_frame( fullname(), Attribute::set_size));
196 
197  COM_assertion( (_loc!='n'||_id==COM_NC) && (_loc!='e'||_id==COM_CONN));
198  _nitems = nitems; _ngitems = ngitems;
199 
200  if ( _ncomp>1) {
201  // Set sizes for each individial component
202  for ( int i=1; i<=_ncomp; ++i) {
203  this[i]._nitems = nitems; this[i]._ngitems = ngitems;
204  }
205  }
206 }
207 
208 void Attribute::set_pointer( void *p, int strd, int cap,
209  int offset, bool is_const) throw(COM_exception)
210 {
211  int nitems=size_of_items(), ncomp=size_of_components();
212 
213  // Check whether received a local variable
214  // const long int stackSize = 2097152; // 2MB
215  // long int dist = std::abs(((long int)p) - (long int)(&nitems));
216  // if ( p && dist <= stackSize)
217  // throw COM_exception( COM_ERR_INVALID_ADDR,
218  // append_frame( fullname(), Attribute::set_pointer));
219 
220  if ( p && strd!=1 && strd<ncomp)
222  append_frame( fullname(), Attribute::set_pointer));
223  if ( p && cap<nitems)
225  append_frame( fullname(), Attribute::set_pointer));
226 
227  _cap = cap;
228  _strd = strd;
229  int basesize = get_sizeof( data_type(), 1);
230  _nbytes_strd = basesize*strd;
231 
232  if ( _status == STATUS_ALLOCATED) deallocate();
233  if ( p && offset) {
234  if ( strd==1)
235  _ptr = ((char*)p) + (offset*cap)*_nbytes_strd;
236  else // Staggerred
237  _ptr = ((char*)p) + offset*basesize;
238  }
239  else
240  _ptr = p;
241  _status = is_const?STATUS_SET_CONST:STATUS_SET;
242 
243  if ( ncomp >1 && _id>=0) for ( int i=1; i<=ncomp; ++i) {
244  this[i].set_pointer( _ptr, _strd, _cap, i-1, is_const);
245  }
246 }
247 
248 void Attribute::
249 copy_array( void *buf, int strd, int n,
250  int offset, int direction) throw (COM_exception)
251 {
252  if (direction==COPY_IN) {
253  if ( is_const())
255  append_frame( fullname(), Attribute::copy_array));
256 
257  if ( _status==STATUS_NOT_INITIALIZED && _parent)
258  { _cap = root()->_cap; _strd = root()->_strd; _nbytes_strd=root()->_nbytes_strd; }
259  }
260 
261  int nitems=size_of_items(), ncomp=size_of_components();
262 
263  if ( n ==0) { if ( direction==COPY_IN) return; else n = nitems; }
264  if ( strd==0) strd=ncomp;
265 
266  if ( !buf && n)
268  append_frame( fullname(), Attribute::copy_array));
269 
270  // strd must be either 1 or at least as large as _strd
271  if ( strd!=1 && strd<ncomp)
273  append_frame( fullname(), Attribute::copy_array));
274 
275  if ( offset<0 || n+offset>_cap)
277  append_frame( fullname(), Attribute::copy_array));
278 
279  int basesize = get_sizeof( data_type());
280 
281  char *ptr0 = (char*)pointer();
282  if (offset) ptr0 += offset*ncomp*basesize;
283 
284  if ( _strd == strd && (_strd == ncomp || n==_cap && strd==1) ) {
285  // two arrays have the same layout
286  if ( direction == COPY_IN)
287  std::memcpy( ptr0, buf, n*ncomp*basesize);
288  else
289  std::memcpy( buf, ptr0, n*ncomp*basesize);
290  }
291  else if ( _strd>1 && strd>1) {
292  // the components are stored contiguously in both arrays
293  char *p_buf=(char*)buf;
294  char *p_att = ptr0;
295  int strd_att_in_bytes = _nbytes_strd;
296  int strd_buf_in_bytes = strd*basesize;
297  int vecsize = ncomp*basesize;
298 
299  for ( int i=0, ni=std::min(n, nitems); i<ni; ++i) {
300  if ( direction == COPY_IN)
301  std::memcpy( p_att, p_buf, vecsize);
302  else
303  std::memcpy( p_buf, p_att, vecsize);
304  p_buf += strd_buf_in_bytes;
305  p_att += strd_att_in_bytes;
306  }
307  }
308  else {
309  // layouts of two arrays are very different from each
310  char *p_buf=(char*)buf;
311  char *p_att = ptr0;
312 
313  int strd_att_in_bytes = _nbytes_strd;
314  int strd_buf_in_bytes = strd*basesize;
315  int step_att_in_bytes= (_strd==1?_cap:1)*basesize;
316  int step_buf_in_bytes = (strd==1?n:1)*basesize;
317  for ( int i=0, ni=std::min(n, nitems); i<ni; ++i) {
318  for ( int j=0, offset_buf=0, offset_att=0; j<ncomp; ++j) {
319  if ( direction == COPY_IN)
320  std::memcpy( p_att+offset_att, p_buf+offset_buf, basesize);
321  else
322  std::memcpy( p_buf+offset_buf, p_att+offset_att, basesize);
323  offset_buf += step_buf_in_bytes;
324  offset_att += step_att_in_bytes;
325  }
326  p_buf += strd_buf_in_bytes;
327  p_att += strd_att_in_bytes;
328  }
329  }
330 }
331 
332 // Append n _ncomp-vectors from "from" to the array.
333 void Attribute::
334 append_array( const void *from, int strd, int nitem) throw(COM_exception)
335 {
336  if ( !is_panel() && !is_windowed() || size_of_ghost_items())
339 
340  int offset = size_of_items();
341  copy_array( const_cast<void*>(from), strd, nitem, offset);
342  set_size( offset+nitem);
343 }
344 
345 void *Attribute::allocate( int strd, int cap, bool force) throw( COM_exception)
346 {
347  int nitems=size_of_items(), ncomp=size_of_components();
348 
349  if ( strd!=1 && strd<ncomp)
351  append_frame( fullname(), Attribute::allocate));
352  if ( cap<nitems)
354  append_frame( fullname(), Attribute::allocate));
355 
356  if ( !force && (_parent || _status==STATUS_SET || _status==STATUS_SET_CONST))
358  append_frame( fullname(), Attribute::allocate));
359 
360  try {
361  int type = data_type();
362  // Go ahead to allocate for the attribute if it was not initialized
363  // and not inherited or it is forced to overwrite previously set address.
364  int nold, old_cap;
365  if ( _status == STATUS_NOT_INITIALIZED || force)
366  { nold = -1; old_cap = 0; }
367  else {
368  old_cap = _cap;
369  nold = old_cap*get_sizeof(type, std::max(_strd,ncomp));
370  }
371 
372  int nnew = cap*get_sizeof(type, std::max(strd,ncomp));
373 
374  // if the capacity is not big enough or the stride is changed.
375  if ( nold < nnew || strd != _strd) {
376  // Deallocate the old array and copy values to the new one
377  char *old_ptr = (char*)_ptr;
378  int old_strd = _strd;
379 
380  if ( nnew) {
381  _ptr = new char[nnew];
382  std::fill_n( (char*)_ptr, nnew, 0);
383  if (_ptr==NULL)
385  append_frame( fullname(), Attribute::allocate));
386  }
387  else _ptr = NULL;
388  _cap = cap; _strd = strd; _nbytes_strd = get_sizeof( data_type(), strd);
389 
390  // Copy data from old array to the new.
391  if ( old_cap && _ptr) {
392  if ( _ncomp ==1 || _id<0) // Copy for connectivity and for scalars
393  copy_array( old_ptr, old_strd, std::min(old_cap,_cap));
394  else { // loop through individual components
395  for ( int i=1; i<=ncomp; ++i) {
396  Attribute *ai = this+i;
397  char *old_ptr_i = (char*)ai->_ptr; old_strd=ai->_strd;
398  old_cap = ai->_cap;
399  ai->set_pointer( _ptr, _strd, _cap, i-1, false);
400  ai->copy_array( old_ptr_i, old_strd, std::min(old_cap,_cap));
401 
402  // Delete the individual components
403  if ( ai->_status == STATUS_ALLOCATED && old_ptr_i)
404  delete [] old_ptr_i;
405  }
406  }
407  }
408  else {
409  if ( _ncomp >1 && _id>=0) for ( int i=1; i<=ncomp; ++i) {
410  this[i].set_pointer( _ptr, _strd, _cap, i-1, false);
411  }
412  }
413 
414  // Delete the old array for all components
415  if ( _status == STATUS_ALLOCATED && old_ptr) delete [] old_ptr;
416 
417  _status = STATUS_ALLOCATED;
418  if ( _parent) _parent=NULL; // Break inheritance.
419  }
420  }
422  return _ptr;
423 }
424 
425 void Attribute::
426 inherit( Attribute *parent, bool clone, bool withghost, int depth) throw(COM_exception)
427 {
428  Attribute *root = parent->root();
429  _loc=root->_loc; _ncomp=root->_ncomp; _type=root->_type;
430  _cap = root->_cap; _strd = root->_strd;
431  _nbytes_strd = get_sizeof( _type, _strd); _unit=root->_unit;
432 
433  if ( !clone) {
434  _parent = parent;
435 
436  // Inherit individual components
437  if ( _ncomp>1 && _id>=0) try {
438  for ( int i=1; i<=_ncomp; ++i) {
439  this[i].inherit( parent+i, clone, withghost, 1);
440  }
442  }
443  else {
444  _parent = NULL;
445  // Set size
446  if ( withghost) {
447  _nitems = parent->size_of_items();
448  _ngitems = parent->size_of_ghost_items();
449  }
450  else {
451  _nitems = parent->size_of_real_items();
452  _ngitems = 0;
453  }
454  if ( depth>0) return;
455 
456  // Allocate and copy from parent if parent was initialized.
457  try {
458  if (parent->initialized()) allocate( _ncomp, _cap, true);
459  else deallocate();
461 
462  // Set pointer for individual components if allocated.
463  if ( _ncomp>1 && _id>=0) try {
464  for ( int i=1; i<=_ncomp; ++i) {
465  this[i].inherit( parent+i, clone, withghost, 1);
466  if (allocated())
467  this[i].set_pointer( _ptr, _strd, _cap, i-1, false);
468  }
470  }
471 }
472 
474  try {
475  // Deallocate attribute and set individual components to not initialized.
476  if ( _status != STATUS_ALLOCATED) return -1; // failed
478  if ( _ptr) { delete [] (char*)_ptr; _ptr = NULL; }
479 
480  if ( _ncomp>1 && _id>=0)
481  for ( int i=1; i<=_ncomp; ++i)
482  { this[i]._ptr = NULL; this[i]._status = STATUS_NOT_INITIALIZED; }
483  }
485  return 0;
486 }
487 
488 int Attribute::get_sizeof( COM_Type type, int count) {
489  switch (type) {
490  case COM_CHAR:
491  case COM_UNSIGNED_CHAR:
492  case COM_BYTE:
493  case COM_BOOL:
494  case COM_CHARACTER: return count;
495 
496  case COM_UNSIGNED_SHORT:
497  case COM_SHORT: return count*sizeof(short);
498 
499  case COM_INT:
500  case COM_INTEGER:
501  case COM_LOGICAL:
502  case COM_UNSIGNED: return count*sizeof(int);
503 
504  case COM_UNSIGNED_LONG:
505  case COM_LONG: return count*sizeof(long int);
506 
507  case COM_FLOAT:
508  case COM_REAL: return count*sizeof(float);
509 
511  case COM_DOUBLE: return count*sizeof(double);
512 
513  case COM_LONG_DOUBLE: return count*sizeof(long double);
514 
515  case COM_COMPLEX: return count*2*sizeof(float);
516  case COM_DOUBLE_COMPLEX: return count*2*sizeof(double);
517 
518  case COM_MPI_COMMC: return count*sizeof(MPI_Comm);
519  case COM_MPI_COMMF: return count*sizeof(int);
520 
521  case COM_F90POINTER: return count*64;
522  case COM_METADATA:
523  case COM_VOID: return sizeof(void*)*count;
524  case COM_OBJECT: return sizeof(COM_Object*)*count;
525  case COM_STRING: return count;
526 
527  default: COM_assertion(false); return -1;
528  }
529 }
530 
532  if (t1 == t2) return true;
533  if ( Attribute::get_sizeof( t1, 1) != Attribute::get_sizeof( t2, 1))
534  return false;
535 
536  switch( t1) {
537  case COM_CHAR:
538  case COM_CHARACTER:
539  case COM_UNSIGNED_CHAR:
540  case COM_BYTE:
541  case COM_SHORT:
542  case COM_UNSIGNED_SHORT:
543  return true; // size matching
544  case COM_INT:
545  case COM_INTEGER:
546  case COM_UNSIGNED:
547  case COM_LONG:
548  case COM_UNSIGNED_LONG:
549  return t2 == COM_INT || t2 == COM_INTEGER || t2 == COM_UNSIGNED ||
550  t2 == COM_UNSIGNED_LONG || t2 == COM_LONG;
551  case COM_FLOAT:
552  case COM_REAL:
553  return t2 == COM_FLOAT || t2 == COM_REAL;
554  case COM_DOUBLE:
556  return t2 == COM_DOUBLE_PRECISION || t2 == COM_DOUBLE;
557  default:
558  return false;
559  }
560 }
561 
562 
563 COM_END_NAME_SPACE
564 
565 
566 
567 
568 
569 
void inherit(Attribute *a, bool clone, bool withghost, int depth=0)
Inherit from parent. If depth&gt;0, then the procedure is for the subcomponents.
Definition: Attribute.C:426
Attribute * _parent
Parent attribute being used.
Definition: Attribute.h:299
const Window * window() const
Obtain a constant pointer to its owner window object.
Definition: Pane.h:91
int COM_Type
Indices for derived data types.
Definition: roccom_basic.h:122
int _ngitems
Size of ghost items.
Definition: Attribute.h:313
A Pane object contains a mesh, pane attribute, and field variables.
Definition: Pane.h:43
bool size_set() const
Returns whether the size for the attribute has been set.
Definition: Attribute.C:99
int _nbytes_strd
Number of bytes of the stride.
Definition: Attribute.h:322
int maxsize_of_real_items() const
Obtain the maximum allowed number of real items in the attribute.
Definition: Attribute.C:179
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
int _strd
Stride.
Definition: Attribute.h:321
void set_pointer(void *p, int strd, int cap, int offset, bool is_const)
Set the physical address of the attribute values.
Definition: Attribute.C:208
Contains the prototypes for the Pane object.
An Attribute object is a data member of a window.
Definition: Attribute.h:51
static bool compatible_types(COM_Type t1, COM_Type t2)
Definition: Attribute.C:531
Shorter_size _status
Indicating whether it has been initialized.
Definition: Attribute.h:318
const void * get_addr(int i, int j=0) const
Obtain the address of the jth component of the ith item, where 0&lt;=i&lt;size_of_items.
Definition: Attribute.C:85
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
static const int _keysizes[COM_NUM_KEYWORDS]
Default sizes.
Definition: Attribute.h:328
C/C++ Data types.
Definition: roccom_basic.h:129
const std::string & name() const
Obtain the window&#39;s name.
Definition: Window.h:92
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
const Window * window() const
Obtain a constant pointer to the parent window of the attribute.
Definition: Attribute.C:80
int maxsize_of_items() const
Obtain the maximum allowed number of items in the attribute.
Definition: Attribute.C:125
Encapsulates the states of an exception.
int deallocate()
Deallocate memory if it was allocated by allocate().
Definition: Attribute.C:473
Attribute * attribute(const std::string &a)
Obtain the attribute from given name.
Definition: Pane.C:148
#define CATCHBADALLOC_APPEND(frame)
Macro for catching an deallocation exception and append the information to the current frame...
static const COM_Type _keytypes[COM_NUM_KEYWORDS]
Default data types.
Definition: Attribute.h:327
int capacity() const
Obtain the capacity of the array.
Definition: Attribute.h:230
Attribute * root()
Root of use-inheritance.
Definition: Attribute.h:134
Attribute()
Default constructor.
Definition: Attribute.h:60
std::string _unit
Unit of the attribute.
Definition: Attribute.h:310
int size_of_ghost_items() const
Obtain the number of ghost items in the attribute.
Definition: Attribute.C:139
bool ignore_ghost() const
Definition: Pane.h:202
Pane * _pane
Pointer to its owner pane.
Definition: Attribute.h:298
void * _ptr
Physical address of the attribute.
Definition: Attribute.h:320
Shorter_size _loc
Location.
Definition: Attribute.h:303
const std::string & name() const
Obtain the name of the attribute.
Definition: Attribute.h:113
blockLoc i
Definition: read.cpp:79
int _gap
Gap between the IDs of real and ghost items.
Definition: Attribute.h:314
std::string _name
Name of the attribute.
Definition: Attribute.h:301
Contains declarations of MPI subroutines used in Roccom.
int _id
Id field data.
Definition: Attribute.h:302
This file contains a set of routines for error assertion.
const NT & n
static int get_sizeof(MPI_Datatype i)
Get the size of a given MPI data type.
Definition: commpi.C:44
int maxsize_of_ghost_items() const
Obtain the maximum allowed number of items in the attribute.
Definition: Attribute.C:153
void set_size(int nitems, int ngitems=0)
Set the size of items and ghost items.
Definition: Attribute.C:191
int size_of_real_items() const
Obtain the number of real items in the attribute.
Definition: Attribute.C:167
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:346
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
j indices j
Definition: Indexing.h:6
COM_Type _type
Base data type of the attribute.
Definition: Attribute.h:309
int _ncomp
Number of components.
Definition: Attribute.h:308
void * allocate(int strd, int cap, bool force)
Allocate memory for the attribute.
Definition: Attribute.C:345
int _nitems
Size of total items. Default value is -1.
Definition: Attribute.h:312
void int int REAL REAL REAL *z blockDim dim * ni
Definition: read.cpp:77
void copy_array(void *buf, int strd, int nitem, int offset=0, int direction=COPY_IN)
Definition: Attribute.C:249
#define CATCHEXP_APPEND(frame)
Macro for catching an exception and append the information to the current frame.
Contains the prototype of Attriubte.
static const char _keylocs[COM_NUM_KEYWORDS]
Default locations.
Definition: Attribute.h:326
Fortran Data types.
Definition: roccom_basic.h:133
static const char * _keywords[COM_NUM_KEYWORDS]
List of keywords.
Definition: Attribute.h:325
Contains the prototypes for the Window object.
int _cap
Capacity.
Definition: Attribute.h:323
int size_of_items() const
Obtain the number of items in the attribute.
Definition: Attribute.C:111
std::string fullname() const
Obtain the full name of the attribute including window name suitable for printing out error messages...
Definition: Attribute.C:82
static int get_sizeof(COM_Type type, int count=1)
Definition: Attribute.C:488
void append_array(const void *from, int strd, int nitem)
Definition: Attribute.C:334