SheafSystem
0.0.0.0
|
A whitespace separated list of arguments. Insertion operaters are used to insert arguments into the list. C++ strings are treated as string literals. The value of the string is inserted into arg_list. More...
#include <arg_list.h>
Classes | |
struct | arg_type |
The internal argument type. More... | |
Public Member Functions | |
arg_list () | |
Default constructor. More... | |
arg_list (const arg_list &xinput) | |
Copy constructor. More... | |
arg_list (const arg_type &xarg) | |
Creates an instance with arg xarg. More... | |
arg_list (const char *xarg_name) | |
Creates an instance with one arg with name xarg_name; if xarg_name is empty, creates an empty arg_list. Intended for initializing empty arg_lists with string literal "". More... | |
unsigned int | ct () const |
The number of arguments. More... | |
bool | empty () const |
True if and only if there are no arguments in the list. More... | |
int | index (const std::string &xname) const |
The index of the argument with name xname. More... | |
const std::string & | name (int xi) const |
The name of the xi-th argument. More... | |
int | type (int xi) const |
The type of the xi-th argument. More... | |
int | type (const std::string &xname) const |
The type of the argument with name xname. More... | |
primitive_value & | value (int xi) |
The value of the xi-th argument. More... | |
const primitive_value & | value (int xi) const |
The value of the xi-th argument, const version. More... | |
primitive_value & | value (const std::string &xname) |
The value of argument with name xname. More... | |
const primitive_value & | value (const std::string &xname) const |
The value of argument with name xname, const version. More... | |
arg_list & | operator+= (const arg_list &xother) |
Append arg_list xother. More... | |
arg_list & | operator<< (const primitive_value &xinput) |
Insert a primitive value. More... | |
bool | parsing_name () const |
True if next token should be an argument name. More... | |
bool | parsing_value () const |
True if next token should be an argument value. More... | |
bool | parsing_error () const |
True if argument input has found an error. More... | |
bool | conforms_to (const namespace_poset &xns, const poset_path &xschema_path, bool xuse_table_schema, bool xauto_access) const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by xschema_path. More... | |
bool | conforms_to (const schema_poset_member &xschema, bool xuse_table_schema, bool xauto_access) const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by xschema. More... | |
bool | conforms_to_extension (const namespace_poset &xns, const poset_path &xschema_path, const poset_path &xstd_schema_path, bool xuse_table_schema, bool xauto_access) const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by the part of xschema_path that is not contained in xstd_schema_path. More... | |
bool | conforms_to_extension (const schema_poset_member &xschema, const schema_poset_member &xstd_schema, bool xuse_table_schema, bool xauto_access) const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by the part of xschema that is not contained in xstd_schema. More... | |
void | clear () |
Removes all arguments. More... | |
arg_type & | arg (int xi) |
The xi-th arg. More... | |
const arg_type & | arg (int xi) const |
The xi-th arg. More... | |
bool | contains_arg (const std::string &xname) const |
True if and only if this contains an arg with name xname. More... | |
bool | contains_args (const arg_list &xother) const |
True if and only if this contains all the args of xother. More... | |
arg_type & | arg (const std::string &xname) |
The arg with name xname. More... | |
const arg_type & | arg (const std::string &xname) const |
The arg with name xname. More... | |
arg_type & | back () |
The last arg. More... | |
const arg_type & | back () const |
The last arg, const version. More... | |
void | push_back (const arg_type &xarg) |
Friends | |
SHEAF_DLL_SPEC std::ostream & | operator<< (std::ostream &os, const arg_list &xf) |
Insert arg_list p into ostream os. More... | |
SHEAF_DLL_SPEC std::istream & | operator>> (std::istream &is, arg_list &xf) |
Extract arg_list p from istream is. More... | |
A whitespace separated list of arguments. Insertion operaters are used to insert arguments into the list. C++ strings are treated as string literals. The value of the string is inserted into arg_list.
Definition at line 63 of file arg_list.h.
sheaf::arg_list::arg_list | ( | ) |
sheaf::arg_list::arg_list | ( | const arg_list & | xinput | ) |
Copy constructor.
Definition at line 58 of file arg_list.cc.
References arg_list(), and contains_args().
sheaf::arg_list::arg_list | ( | const arg_type & | xarg | ) |
Creates an instance with arg xarg.
Definition at line 77 of file arg_list.cc.
References arg_list(), back(), sheaf::arg_list::arg_type::empty(), empty(), and push_back().
sheaf::arg_list::arg_list | ( | const char * | xarg_name | ) |
Creates an instance with one arg with name xarg_name; if xarg_name is empty, creates an empty arg_list. Intended for initializing empty arg_lists with string literal "".
Definition at line 106 of file arg_list.cc.
References back(), ct(), sheaf::arg_list::arg_type::empty(), empty(), name(), and push_back().
sheaf::arg_list::arg_type & sheaf::arg_list::arg | ( | int | xi | ) |
The xi-th arg.
Definition at line 989 of file arg_list.cc.
References ct().
Referenced by arg(), contains_args(), sheaf::deep_size(), sheaf::table_dof_tuple_record::transfer_poset_to_internal_buffer(), type(), and value().
const sheaf::arg_list::arg_type & sheaf::arg_list::arg | ( | int | xi | ) | const |
The xi-th arg.
Definition at line 1011 of file arg_list.cc.
References contains_arg(), and ct().
sheaf::arg_list::arg_type & sheaf::arg_list::arg | ( | const std::string & | xname | ) |
The arg with name xname.
Definition at line 1084 of file arg_list.cc.
References arg(), contains_arg(), and index().
const sheaf::arg_list::arg_type & sheaf::arg_list::arg | ( | const std::string & | xname | ) | const |
The arg with name xname.
Definition at line 1108 of file arg_list.cc.
References arg(), back(), contains_arg(), and index().
sheaf::arg_list::arg_type & sheaf::arg_list::back | ( | ) |
The last arg.
Definition at line 1132 of file arg_list.cc.
References ct().
Referenced by arg(), and arg_list().
const sheaf::arg_list::arg_type & sheaf::arg_list::back | ( | ) | const |
The last arg, const version.
Definition at line 1154 of file arg_list.cc.
References ct(), and push_back().
void sheaf::arg_list::clear | ( | ) |
Removes all arguments.
Definition at line 729 of file arg_list.cc.
References ct(), and sheaf::arg_list::arg_type::put_type().
Referenced by conforms_to_extension().
bool sheaf::arg_list::conforms_to | ( | const namespace_poset & | xns, |
const poset_path & | xschema_path, | ||
bool | xuse_table_schema, | ||
bool | xauto_access | ||
) | const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by xschema_path.
Definition at line 529 of file arg_list.cc.
References sheaf::poset_path::member_exists(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_path::state_is_read_accessible().
Referenced by sheaf::poset_dof_map::get_dof_tuple(), fiber_bundle::product_section_space_schema_poset::new_state(), parsing_error(), sheaf::poset_dof_map::put_dof_tuple(), and fiber_bundle::section_space_schema_poset::rep_is_valid().
bool sheaf::arg_list::conforms_to | ( | const schema_poset_member & | xschema, |
bool | xuse_table_schema, | ||
bool | xauto_access | ||
) | const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by xschema.
Definition at line 560 of file arg_list.cc.
References conforms_to_extension(), sheaf::schema_poset_member::dof_iterator(), sheaf::poset_dof_iterator::force_is_done(), sheaf::poset_component::get_read_access(), sheaf::poset_dof_iterator::is_done(), sheaf::poset_dof_iterator::item(), sheaf::poset_dof_iterator::next(), sheaf::poset_component::release_access(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
bool sheaf::arg_list::conforms_to_extension | ( | const namespace_poset & | xns, |
const poset_path & | xschema_path, | ||
const poset_path & | xstd_schema_path, | ||
bool | xuse_table_schema, | ||
bool | xauto_access | ||
) | const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by the part of xschema_path that is not contained in xstd_schema_path.
Definition at line 618 of file arg_list.cc.
References sheaf::poset_path::conforms_to(), sheaf::schema_poset_member::detach_from_state(), sheaf::poset_path::member_exists(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_path::state_is_read_accessible().
Referenced by conforms_to().
bool sheaf::arg_list::conforms_to_extension | ( | const schema_poset_member & | xschema, |
const schema_poset_member & | xstd_schema, | ||
bool | xuse_table_schema, | ||
bool | xauto_access | ||
) | const |
True if the values in this conform to the table schema (xuse_table_schema true) or row schema (xuse_table_schema false) specified by the part of xschema that is not contained in xstd_schema.
Definition at line 655 of file arg_list.cc.
References clear(), sheaf::schema_poset_member::conforms_to(), sheaf::poset_dof_iterator::ct(), sheaf::schema_poset_member::dof_iterator(), sheaf::poset_component::get_read_access(), sheaf::poset_component::index(), sheaf::poset_component::release_access(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
bool sheaf::arg_list::contains_arg | ( | const std::string & | xname | ) | const |
True if and only if this contains an arg with name xname.
Definition at line 1033 of file arg_list.cc.
References contains_args(), and index().
Referenced by arg(), contains_args(), type(), and value().
bool sheaf::arg_list::contains_args | ( | const arg_list & | xother | ) | const |
True if and only if this contains all the args of xother.
Definition at line 1051 of file arg_list.cc.
References arg(), contains_arg(), and sheaf::arg_list::arg_type::name.
Referenced by arg_list(), contains_arg(), and operator+=().
unsigned int sheaf::arg_list::ct | ( | ) | const |
The number of arguments.
Definition at line 139 of file arg_list.cc.
References empty().
Referenced by arg(), arg_list(), back(), clear(), empty(), sheaf::poset_dof_map::get_dof_tuple(), index(), name(), sheaf::operator<<(), push_back(), sheaf::poset_dof_map::put_dof_tuple(), sheaf::table_dof_tuple_record::transfer_poset_to_internal_buffer(), type(), and value().
bool sheaf::arg_list::empty | ( | ) | const |
True if and only if there are no arguments in the list.
Definition at line 146 of file arg_list.cc.
Referenced by arg_list(), and ct().
int sheaf::arg_list::index | ( | const std::string & | xname | ) | const |
The index of the argument with name xname.
Definition at line 168 of file arg_list.cc.
Referenced by arg(), contains_arg(), sheaf::deep_size(), empty(), and sheaf::poset_dof_map::put_dof_tuple().
const std::string & sheaf::arg_list::name | ( | int | xi | ) | const |
The name of the xi-th argument.
Definition at line 200 of file arg_list.cc.
Referenced by arg_list(), sheaf::deep_size(), and index().
sheaf::arg_list & sheaf::arg_list::operator+= | ( | const arg_list & | xother | ) |
Append arg_list xother.
Definition at line 380 of file arg_list.cc.
References contains_args(), and operator<<.
Referenced by value().
sheaf::arg_list & sheaf::arg_list::operator<< | ( | const primitive_value & | xinput | ) |
Insert a primitive value.
Definition at line 405 of file arg_list.cc.
References sheaf::primitive_value::id(), parsing_name(), and sheaf::primitive_value::value().
bool sheaf::arg_list::parsing_error | ( | ) | const |
True if argument input has found an error.
Definition at line 507 of file arg_list.cc.
References conforms_to().
Referenced by parsing_value().
bool sheaf::arg_list::parsing_name | ( | ) | const |
True if next token should be an argument name.
Definition at line 459 of file arg_list.cc.
References parsing_value().
Referenced by operator<<(), and push_back().
bool sheaf::arg_list::parsing_value | ( | ) | const |
True if next token should be an argument value.
Definition at line 483 of file arg_list.cc.
References parsing_error().
Referenced by parsing_name().
void sheaf::arg_list::push_back | ( | const arg_type & | xarg | ) |
Definition at line 1176 of file arg_list.cc.
References ct(), and parsing_name().
Referenced by arg_list(), back(), and sheaf::poset_dof_map::get_dof_tuple().
int sheaf::arg_list::type | ( | int | xi | ) | const |
The type of the xi-th argument.
Definition at line 222 of file arg_list.cc.
References ct().
Referenced by sheaf::deep_size(), and name().
int sheaf::arg_list::type | ( | const std::string & | xname | ) | const |
The type of the argument with name xname.
Definition at line 244 of file arg_list.cc.
References arg(), contains_arg(), sheaf::arg_list::arg_type::type(), and value().
sheaf::primitive_value & sheaf::arg_list::value | ( | int | xi | ) |
The value of the xi-th argument.
Definition at line 267 of file arg_list.cc.
References ct().
Referenced by fiber_bundle::product_section_space_schema_poset::make_arg_list(), sheaf::poset_dof_map::put_dof_tuple(), sheaf::arg_list::arg_type::put_type(), fiber_bundle::section_space_schema_poset::rep_is_valid(), type(), and value().
const sheaf::primitive_value & sheaf::arg_list::value | ( | int | xi | ) | const |
The value of the xi-th argument, const version.
Definition at line 289 of file arg_list.cc.
sheaf::primitive_value & sheaf::arg_list::value | ( | const std::string & | xname | ) |
The value of argument with name xname.
Definition at line 311 of file arg_list.cc.
References arg(), contains_arg(), sheaf::arg_list::arg_type::value, and value().
const sheaf::primitive_value & sheaf::arg_list::value | ( | const std::string & | xname | ) | const |
The value of argument with name xname, const version.
Definition at line 334 of file arg_list.cc.
References arg(), contains_arg(), operator+=(), and sheaf::arg_list::arg_type::value.
|
friend |
Insert arg_list p into ostream os.
Referenced by operator+=().
|
friend |
Extract arg_list p from istream is.