|
| ||||||||||||||||
This relates to the import/export directives of protocols.
Depending on what protocols support, they will normally have a single import/export policy list associated with them.
Each policy list is an instantiation of a policy, and thus it hold the specific code for this instantiation.
| typedef set<uint32_t> TagSet | TagSet |
| typedef map<string,TagSet*> TagMap | TagMap |
| enum PolicyType { IMPORT, EXPORT } | PolicyType |
| PolicyList (const string& p, PolicyType pt,
PolicyMap& pmap,
SetMap& smap, VarMap& vmap)
| PolicyList |
Parameters:
| p | protocol for which this list applies. |
| pt | the type of policy list [import/export]. |
| pmap | the container of all policies. |
| smap | the container of all sets. |
| vmap | the VarMap. |
| ~PolicyList ()
| ~PolicyList |
| void push_back (const string& policyname)
| push_back |
Append a policy to the list.
Parameters:
| policyname | the name of the policy |
| void compile_policy (PolicyStatement& ps,
Code::TargetSet& mod,
uint32_t& tagstart)
| compile_policy |
Compiles a specific policy.
Throws an exception on semantic / compile errors.
Parameters:
| ps | policy to compile. |
| mod | set filled with targets which are modified by compilation. |
| tagstart | first policy tag available. |
| void compile (Code::TargetSet& mod, uint32_t& tagstart)
| compile |
Compile all policies which were not previously compiled.
Throws an exception on semantic / compile errors.
Parameters:
| mod | set filled with targets which are modified by compilation. |
| tagstart | first policy tag available. |
| string str ()
| str |
Returns: string representation of list
| void link_code (Code& ret)
| link_code |
Link the all the code avialable in this policy list with code supplied.
The code supplied will normally contain a target, so only relevant code is linked.
Parameters:
| ret | code to link with. |
| void get_targets (Code::TargetSet& targets)
| get_targets |
Return all targets in this policy list.
Parameters:
| targets | set filled with all targets in this policy instantiation. |
| void get_tags (const string& protocol, Code::TagSet& ts)
| get_tags |
Return all policy tags for a specific protocol.
Parameters:
| protocol | protocol for which tags are requesdted. |
| ts | set filled with policy-tags used by the protocol. |