#include <AccessPolicyStore.hpp>
Public Types | |
enum | ACCESS_LEVEL { FREE, LOCKED, HIDDEN } |
Public Member Functions | |
AccessPolicy () | |
ACCESS_LEVEL | getAccess (unsigned int index) const |
Access Policy will tell ModelObjects witch fields to expose
The Policy will restrict your access to ModelObject data. Workspace objects have fields. you can index into those fields and get the value, change the value, etc. ModelObjects may not want to allow you to change things, or even show them. The policy is used to build GUIs, it is not really something for general use in the backend data manipulation side of things. The idea is that each program might have its own XML file that tells the AccessPolicy how to display fields.
openstudio::model::AccessPolicy::AccessPolicy | ( | ) |
ACCESS_LEVEL openstudio::model::AccessPolicy::getAccess | ( | unsigned int | index | ) | const |
gets the level of access
index | the index into the field vector |
If you send in an erroneous index, or the policy didn't load information for that index, you will get FREE back. (You might get surprising results when you ask a workspace object for that bogus index though. :) )