Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UseAttribute Class Reference

#include <Agent.h>

Inheritance diagram for UseAttribute:
Collaboration diagram for UseAttribute:

Public Member Functions

 UseAttribute (Agent *ag, std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_, int wg_=1, const char *ptnname_=0, int val_=0)
 
void create (std::string bufname)
 
- Public Member Functions inherited from AttributeBase
 AttributeBase (Agent *ag, std::string target_window_, std::string attr_)
 
virtual ~AttributeBase ()
 
virtual void assign (std::string bufname)
 

Protected Attributes

std::string parent_window
 
std::string parent_attr
 
int wg
 
const char * ptnname
 
int val
 

Additional Inherited Members

- Public Attributes inherited from AttributeBase
Agentagent
 
std::string target_window
 
std::string attr
 

Detailed Description

Definition at line 85 of file Agent.h.

Constructor & Destructor Documentation

UseAttribute ( Agent ag,
std::string  target_window_,
std::string  attr_,
std::string  parent_window_,
std::string  parent_attr_,
int  wg_ = 1,
const char *  ptnname_ = 0,
int  val_ = 0 
)

Definition at line 171 of file Agent.C.

171  :
172  AttributeBase(ag, target_window_, attr_),
173  parent_window(parent_window_), parent_attr(parent_attr_),
174  wg(wg_), ptnname(ptnname_), val(val_)
175 {
176 }
int val
Definition: Agent.h:91
std::string parent_attr
Definition: Agent.h:88
int wg
Definition: Agent.h:89
AttributeBase(Agent *ag, std::string target_window_, std::string attr_)
Definition: Agent.h:51
std::string parent_window
Definition: Agent.h:87
const char * ptnname
Definition: Agent.h:90

Member Function Documentation

void create ( std::string  bufname)
virtual

Reimplemented from AttributeBase.

Definition at line 178 of file Agent.C.

References AttributeBase::agent, AttributeBase::attr, COM_get_attribute(), COM_get_attribute_handle(), COM_use_attribute(), Agent::get_surface_window(), MAN_DEBUG, MPI_COMM_WORLD, parent_attr, parent_window, ptnname, AttributeBase::target_window, val, and wg.

179 {
180  if (parent_window=="") {
182  }
183  if (COM_get_attribute_handle( bufname+attr) > 0) {
184  char loc1, loc2;
185  int type1, type2;
186  int ncomp1, ncomp2;
187  std::string unit1, unit2;
188  COM_get_attribute( bufname+attr, &loc1, &type1, &ncomp1, &unit1);
189  COM_get_attribute( parent_window+parent_attr, &loc2, &type2, &ncomp2, &unit2);
190  if (loc1 != loc2 || type1 != type2 || ncomp1 != ncomp2 || unit1 != unit2) {
191  std::cerr << "Rocstar Error: NewAttribute::create(): Could not create " << target_window+attr << " in two different ways " << std::endl;
192  MPI_Abort(MPI_COMM_WORLD, -1);
193  }
194  else
195  return;
196  }
197  MAN_DEBUG(3, ("UseAttribute::create: %s%s %s%s.\n", bufname.c_str(), attr.c_str(), parent_window.c_str(), parent_attr.c_str()));
199 }
std::string target_window
Definition: Agent.h:48
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
void COM_get_attribute(const std::string wa_str, char *loc, int *type, int *ncomp, std::string *unit)
Definition: roccom_c++.h:269
int val
Definition: Agent.h:91
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
std::string parent_attr
Definition: Agent.h:88
std::string get_surface_window() const
Definition: Agent.h:217
int wg
Definition: Agent.h:89
void COM_use_attribute(const char *wname, const char *attr, int wg=1, const char *ptnname=0, int val=0)
Use the subset of panes of another window of which the given pane attribute has value val...
Definition: roccom_c++.h:224
Agent * agent
Definition: Agent.h:47
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
std::string parent_window
Definition: Agent.h:87
std::string attr
Definition: Agent.h:49
const char * ptnname
Definition: Agent.h:90

Here is the call graph for this function:

Member Data Documentation

std::string parent_attr
protected

Definition at line 88 of file Agent.h.

Referenced by create().

std::string parent_window
protected

Definition at line 87 of file Agent.h.

Referenced by create().

const char* ptnname
protected

Definition at line 90 of file Agent.h.

Referenced by create().

int val
protected

Definition at line 91 of file Agent.h.

Referenced by create().

int wg
protected

Definition at line 89 of file Agent.h.

Referenced by create().


The documentation for this class was generated from the following files: