emergent 8.2.2 LayerSpec Class Reference
emergent 8.2.2   Home · Wiki Docs For: LayerSpec · Emergent Help Browser 

LayerSpec Class Reference

generic layer specification

See for more info: Wiki Docs For: LayerSpec

 #include <LayerSpec>

defined at: /mnt/ssd/grey/local/include/Emergent/LayerSpec.h :37-62

Inherits From: BaseSpec, taNBase, taOBase, taBase

Inherited By: LayerSpec*, LayerSpec&, const LayerSpec, LeabraLayerSpec

Index: SubTypes, Members, Methods, Static Members, Static Methods, Expert Members, Expert Methods

Sub Types


SubType Documentation

enum BaseSpec::UsedStatus

ConstantValueDescription
BaseSpec::UNUSED0x00000000this spec has no children and is unused OR this spec and none of its children are used by any objects
BaseSpec::USED0x00000001this spec has no children and is used OR this spec and all of its children are used
BaseSpec::PARENT_USED0x00000002this spec is used but one or more of its child specs are unused
BaseSpec::CHILD_USED0x00000003this spec is not used but one or more of its child specs are used


Regular (preferred) Member and Method Documentation

Members

Member Category: _NoCategory

Member Category: taBase

Methods

Method Category: Access

Method Category: Modify

Method Category: ObjectMgmt

Method Category: State

Method Category: UserData

Method Category: _NoCategory


Member Documentation

Member Category: _NoCategory

BaseSpec::desc : taString

Description of what this variable is for

Member Category: taBase

taNBase::name : taString

name of the object


Method Documentation

Method Category: Access

Variant BaseSpec::Elem ( Variant& idx, taBase::IndexMode mode = IDX_UNK )

get element(s) from container -- return can be a single item or a Matrix of multiple items, depending on the index -- see IndexMode for all the possible indexing modes and associated return values (some of which are not applicable to some containers, as documented for that container)

Show Source Code

Method Category: Modify

BaseSpec* BaseSpec::NewChild ( TypeDef* child_type )

create a new child spec that inherits from this one but can have its own unique parameters

Show Source Code

Method Category: ObjectMgmt

bool LayerSpec::CheckConfig_Layer ( Layer* lay, bool quiet = false )

This is ONLY for spec-specific stuff; the layer still does all its default checking (incl child checking)

Show Source Code

void BaseSpec::Defaults ( )

restore specs to their default original parameter values, for parameters that have a strong default value -- WARNING: you will lose any unique parameters for anything that has a strong default value

Show Source Code

taString taNBase::GetName ( )

Get the name of the object

Show Source Code

bool taNBase::HasName ( )

does the object have a name field that can be set?

Show Source Code

void taNBase::MakeNameUnique ( )

make sure my name is unique relative to names of objects associated with my owner (e.g., if it is a list object), typically because my name has changed, and owner needs to ensure that all names are unique

Show Source Code

void BaseSpec::SetMember ( taString& member, taString& value )

Set member to value for each of the selected objects. Member will be the member name or will be object_name.member_name, e.g. input_size.retina_size.x, replace any space with '_' . This also automatically sets the spec unique flag to 'On' so that this value is unique to this spec, and updates all the children of this spec so they can inherit this change (or not depending on their unique flags).

Show Source Code

bool taNBase::SetName ( taString& nm )

Set the object's name

Show Source Code

Method Category: State

int LayerSpec::GetStateSpecType ( )

derived classes MUST override this and pass correct global type id

Show Source Code

void LayerSpec::Init_LayerState ( LayerState_cpp* lst, NetworkState_cpp* net )

initialize layer state

Show Source Code

Method Category: UserData

void taOBase::RemoveAllUserData ( )

get rid of our user data list entirely -- this is done automatically when saving something that has no user data items, but you can also force it with this method -- deletes the whole list

Show Source Code

Method Category: _NoCategory

bool taNBase::AddFromTemplate ( taBase* obj, bool& is_acceptable )

handles drops from toolbar - when adding an object to a program, network, etc - e.g. dropping generic data table onto a program - set is_acceptable for objects 'not handled' but which are acceptable

Show Source Code

void BaseSpec::ApplyTo ( SpecUser* obj1, SpecUser* obj2 = __null, SpecUser* obj3 = __null, SpecUser* obj4 = __null )

apply this spec to given object(s) (leave NULL any that are not needed)

Show Source Code

bool BaseSpec::CheckObjectType ( taBase* obj )

checks object type, issues error and returns false if not sufficient

Show Source Code

bool BaseSpec::CheckType ( TypeDef* td )

checks typedef type, issues error and returns false if not sufficient

Show Source Code

void BaseSpec::ComparePeers ( BaseSpec* spec )

calls network::SpecComparePeers to populate a table that compares this specs member values with its children's values - this data does not update - call again if you edit spec values!

Show Source Code

void BaseSpec::CompareWithChildren ( )

calls network::SpecCompareWithChildren to populate a table that compares this specs member values with its children's values - this data does not update - call again if you edit spec values!

Show Source Code

BaseSpec* BaseSpec::FindMakeChild ( taString& nm, TypeDef* td = __null, bool& nw_itm = nw_itm_def_arg, taString& alt_nm )

find a child spec of given name, and if not, make it (if nm is not found and alt_nm != NULL, it is searched for)

Show Source Code

BaseSpec* BaseSpec::FindParent ( )

Find the parent spec of this one

Show Source Code

taBase* taOBase::GetOwner ( )

Show Source Code

TypeDef* LayerSpec::GetTypeDef ( )

Show Source Code

bool BaseSpec::GetUnique ( taString& memb_nm )

check inherit bit

Show Source Code

void LayerSpec::Initialize_core ( )

Show Source Code

bool BaseSpec::IsInheritedAndHasParent ( taString& memb_nm )

is given member inherited from its parent (i.e., NOT unique) and parent actually has this member ot inherit from

Show Source Code

bool BaseSpec::RemoveChild ( taString& nm, TypeDef* td = __null )

remove a child based on name or type

Show Source Code

void BaseSpec::SetUnique ( taString& memb_nm, bool on )

set inherit bit

Show Source Code

bool BaseSpec::SpecInheritsFrom ( BaseSpec* spec )

returns true if this spec is the spec, or is one of its children

Show Source Code

void BaseSpec::UpdateChildren ( )

update any children

Show Source Code

void BaseSpec::UpdateMember ( BaseSpec* from, int memb_no )

copy member from given parent

Show Source Code

void BaseSpec::UpdateSpec ( )

update values from parent, and update children

Show Source Code

void LayerSpec::UpdateStateSpecs ( )

Update our corresponding state-side specs -- called in UAE, and call when specifically updating parameters -- each base class needs to define this, getting the proper specs etc

Show Source Code

void BaseSpec::UpdateSubSpecs ( )

update any subspec objects (overload me)

Show Source Code

bool BaseSpec::UpdtIsUsed ( bool gui_updt = true )

update the is_used flag and used_status variable -- returns is_used flag

Show Source Code

void BaseSpec::WhereUsed ( )

display a clickable list of objects that use this spec

Show Source Code

void BaseSpec::WhereUsed_impl ( taBase_PtrList& spec_user_list, String_Array& spec_name_list, bool child )

fill the list of objects where this spec is used - if searching for child specs of the original spec pass true (additional feedback to user)

Show Source Code

taSigLink** taOBase::addr_sig_link ( )

Show Source Code

Static Member and Method Documentation

Static Members

Static Methods


Static Method Documentation


Expert Member and Method Documentation

Expert Members

Expert Member Category: _NoCategory

Expert Member Category: taBase

Expert Methods

Expert Method Category: UserData


Expert Member Documentation

Expert Member Category: _NoCategory

BaseSpec::children : BaseSpec_Group

sub-specs descending from this one and inheriting values

BaseSpec::is_new : bool

is this spec newly created? if so, prompt user to apply it to some objects..

BaseSpec::is_used : bool

is THIS spec used - ignore usage of children

BaseSpec::min_obj_type : TypeDef*

mimimal object type required for spec -- for object that the spec actually operates on

BaseSpec::min_user_type : TypeDef*

mimimal object type required for spec -- for object that manages the spec and the user applies it to

BaseSpec::saved : NameVar_Array

values of members that are not overriding parent values - reset to these values if override is click

LayerSpec::spec_idx : int

index of this spec in list of specs

BaseSpec::unique : String_Array

string list of unique members

BaseSpec::used_status : BaseSpec::UsedStatus

for gui use only to indicate to user the usage of this spec and child specs

Expert Member Category: taBase

taOBase::owner : taBase*

pointer to owner

taOBase::user_data_ : UserDataItem_List*

storage for user data (created if needed) DO NOT ACCESS this list directly -- use the GetUserData / SetUserData etc interface!


Expert Method Documentation

Expert Method Category: UserData

UserDataItem_List* taOBase::GetUserDataList ( bool force = false )

gets the userdatalist for this class

Show Source Code


Copyright © 2017Regents of the University of Colorado, Carnegie Mellon University, Princeton University.
emergent 8.2.2