OpenStudioCore:model
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | List of all members
openstudio::model::AccessPolicy Class Reference

#include <AccessPolicyStore.hpp>

Public Types

enum  ACCESS_LEVEL { FREE, LOCKED, HIDDEN }
 

Public Member Functions

 AccessPolicy ()
 
ACCESS_LEVEL getAccess (unsigned int index) const
 

Detailed Description

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.

Member Enumeration Documentation

tells the ModelObect how to sort its fields for display in a GUI

Enumerator
FREE 

Show this field, allow edits

LOCKED 

Show this field, do not allow edits

HIDDEN 

Constructor & Destructor Documentation

openstudio::model::AccessPolicy::AccessPolicy ( )

Member Function Documentation

ACCESS_LEVEL openstudio::model::AccessPolicy::getAccess ( unsigned int  index) const

gets the level of access

Parameters
indexthe index into the field vector
Returns
defaults to FREE

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. :) )