definitions.h File Reference

Constants and objects used throughout HOOPLE. More...

#include <ctype.h>
#include <new>
#include "outcome.h"

Include dependency graph for definitions.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  common
 the "common" structure gathers some popular elements of lower-level classes. More...

Defines

#define NIL   0
 The value representing a pointer to nothing, or nothing itself.
#define NULL   0
 See NIL.
#define BITS_PER_BYTE   8
 A fundamental constant measuring the number of bits in a byte.
#define PI_APPROX   3.14159265358
 An approximation of the fundamental circular constant.
#define formal(parameter)
 This macro just eats what it's passed; it marks unused formal parameters.
#define MAXINT   0x7fffffff
 Maximum normal integer value.
#define MININT   0x80000000
 Minimum normal integer value.
#define MAXLONG   0x7fffffff
 Maximum long integer value.
#define MINLONG   0x80000000
 Minimum long integer value.
#define MAXCHAR   0x7f
 Maximum byte-based character value.
#define MINCHAR   0x80
 Minimum byte-based character value.
#define MAXSHORT   0x7fff
 Maximum short integer value.
#define MINSHORT   0x8000
 Minimum short integer value.
#define MAXBYTE   0xff
 Maximum unsigned byte value.
#define MINBYTE   0x00
 Minimum unsigned byte value.
#define DEFINE_FILTER(NAME, CURRENT_VALUE, INFO_STRING)   NAME = CURRENT_VALUE
 Macro for defining an auto-generated logging filter value.
#define DEFINE_EVENT(NAME, CURRENT_VALUE, INFO_STRING)   NAME = CURRENT_VALUE
 Macro for defining an auto-generated event value.
#define DEFINE_ARGC_AND_ARGV   int __argc = 0; char **__argv = NIL
 this macro allocates space for the command-line storage areas.
#define LOBYTE(to_chop)   (byte(to_chop))
 similar to win32 LOBYTE definition used by some code.
#define HIBYTE(to_chop)   (byte(0xff & (u_short(to_chop) >> 8)))
 similar to win32 HIBYTE definition used by some code.

Typedefs

typedef unsigned char byte
 A fairly important unit which is seldom defined...
typedef char flexichar
typedef unsigned int u_int
 Abbreviated name for unsigned integers.
typedef unsigned short u_short
 Abbreviated name for unsigned short integers.
typedef unsigned long u_long
 Abbreviated name for unsigned long integers.
typedef char int8
typedef unsigned char uint8
typedef signed short int16
typedef unsigned short uint16
typedef signed long int32
typedef unsigned long uint32

Functions

const char * software_product_name ()
 This global function is available to the system at large for branding info.
double TERABYTE ()
 Number of bytes in a terabyte.

Variables

const int SECOND_ms = 1000
 Number of milliseconds in a second.
const int MINUTE_ms = 60 * SECOND_ms
 Number of milliseconds in a minute.
const int HOUR_ms = 60 * MINUTE_ms
 Number of milliseconds in an hour.
const int DAY_ms = 24 * HOUR_ms
 Number of milliseconds in a day.
const int MINUTE_s = 60
 Number of seconds in a minute.
const int HOUR_s = 60 * MINUTE_s
 Number of seconds in an hour.
const int DAY_s = 24 * HOUR_s
 Number of seconds in a day.
const int KILOBYTE = 1024
 Number of bytes in a kilobyte.
const int MEGABYTE = KILOBYTE * KILOBYTE
 Number of bytes in a megabyte.
const int GIGABYTE = MEGABYTE * KILOBYTE
 Number of bytes in a gigabyte.
int __argc
char ** __argv


Detailed Description

Constants and objects used throughout HOOPLE.

Definition in file definitions.h.


Define Documentation

#define BITS_PER_BYTE   8

A fundamental constant measuring the number of bits in a byte.

Definition at line 69 of file definitions.h.

Referenced by bit_vector::bit_vector(), bit_vector::find_first(), blowfish_crypto::generate_key(), bit_vector::get(), bit_vector::resize(), blowfish_crypto::set_key(), and bit_vector::text_form().

#define DEFINE_ARGC_AND_ARGV   int __argc = 0; char **__argv = NIL

this macro allocates space for the command-line storage areas.

Definition at line 335 of file definitions.h.

#define DEFINE_EVENT ( NAME,
CURRENT_VALUE,
INFO_STRING   )     NAME = CURRENT_VALUE

Macro for defining an auto-generated event value.

The event macro allows an auto-generated value to be associated with different events that can occur. These are different than outcomes since they may arise due to factors other than function invocation. Outcomes occur because functions can return different classes of result values, but events can be generated by external reality and injected into a program.

Definition at line 222 of file definitions.h.

#define DEFINE_FILTER ( NAME,
CURRENT_VALUE,
INFO_STRING   )     NAME = CURRENT_VALUE

Macro for defining an auto-generated logging filter value.

This macro defines a filter value that will automatically be generated as part of the build. These are used for logging using the log_base object.

Definition at line 210 of file definitions.h.

#define formal ( parameter   ) 

This macro just eats what it's passed; it marks unused formal parameters.

Definition at line 81 of file definitions.h.

#define HIBYTE ( to_chop   )     (byte(0xff & (u_short(to_chop) >> 8)))

similar to win32 HIBYTE definition used by some code.

Definition at line 494 of file definitions.h.

#define LOBYTE ( to_chop   )     (byte(to_chop))

similar to win32 LOBYTE definition used by some code.

Definition at line 491 of file definitions.h.

Referenced by CNSFlexConstraint::Init().

#define MAXBYTE   0xff

Maximum unsigned byte value.

Definition at line 147 of file definitions.h.

#define MAXCHAR   0x7f

Maximum byte-based character value.

Definition at line 131 of file definitions.h.

#define MAXINT   0x7fffffff

Maximum normal integer value.

Definition at line 115 of file definitions.h.

Referenced by list_parsing::get_ids_from_string(), octopus::issue_identity(), and octopus_request_id::randomized_id().

#define MAXLONG   0x7fffffff

Maximum long integer value.

Definition at line 123 of file definitions.h.

#define MAXSHORT   0x7fff

Maximum short integer value.

Definition at line 139 of file definitions.h.

#define MINBYTE   0x00

Minimum unsigned byte value.

Definition at line 151 of file definitions.h.

#define MINCHAR   0x80

Minimum byte-based character value.

Definition at line 135 of file definitions.h.

#define MININT   0x80000000

Minimum normal integer value.

Definition at line 119 of file definitions.h.

#define MINLONG   0x80000000

Minimum long integer value.

Definition at line 127 of file definitions.h.

#define MINSHORT   0x8000

Minimum short integer value.

Definition at line 143 of file definitions.h.

#define NIL   0

The value representing a pointer to nothing, or nothing itself.

Definition at line 59 of file definitions.h.

Referenced by spocket::accept(), directory_tree::access(), nodes::safe_list_write_iterator::access(), nodes::list::iterator::access(), nodes::object_catalog::acquire(), hash_table< key_type, contents >::acquire(), deep_array< contents >::acquire(), amorph< contents >::acquire(), entity_data_bin::acquire_for_any(), entity_data_bin::acquire_for_entity(), entity_data_bin::acquire_for_identifier(), directory_tree::add_path(), AddAccessAllowedACEToACL(), AddAccessDeniedACEToACL(), AddPrincipalToNamedValueSD(), amorph< contents >::adjust(), guards::alert_message(), allocate(), amorph_assign(), nodes::list::append(), portable::application_name(), array_tester(), cromp_client::asynch_connect(), tentacle::attach_storage(), amorph< contents >::borrow(), nodes::tree::branch(), portable::break_line(), nodes::objcat_iterator::cat(), amorph< contents >::clear(), list_manager::clone_object(), byte_filer::close(), anchor_window::close_app_window(), stdio_redirecter::close_input(), scheduler::close_iterator(), test_rpc_server::close_rpc(), anchor_window::close_this_program(), deep_array< contents >::concatenate(), array< contents >::concatenation(), spocket::connect(), service_control::control_service(), CopyACL(), drawing_window::Create(), library_plugins::dynamic_library_loader::create(), tiny_shell::Create(), debugging_frame::Create(), create_simplistic_window(), CreateNewSD(), blowfish_crypto::decrypt(), cromp_client::decrypt_package_as_needed(), tentacle::detach_storage(), buffer_manager::disengage(), cromp_server::enable_servers(), blowfish_crypto::encrypt(), static_memory_gremlin::ensure_space_exists(), octopus::evaluate(), menu_base::evaluate_trigger(), portable::event_poll(), file_transfer_tentacle::file_transfer_tentacle(), scheduler::find(), filename_list::find(), nodes::symbol_tree::find(), nodes::object_catalog::find(), symbol_table< contents >::find(), static_memory_gremlin::find(), hash_table< void *, live_object_info >::find(), hash_table< key_type, contents >::find(), configuration_list::find(), argument_list::generate(), generate_key(), RSA_crypto::generate_key(), static_memory_gremlin::get(), amorph< contents >::get(), hamming::get_defaults(), menu_base::get_item(), nodes::node::get_link(), version_checker::get_record(), menu_base::get_submenu(), thread_cabinet::get_thread(), version_checker::get_version(), GetCurrentUserSID(), GetRunAsPassword(), HOOPLE_GLOBALS(), service_root::initialize(), nodes::tree::insert(), nodes::list::insert(), service_root::install(), basis::set< contents >::intersection(), internet_address::is_valid_internet_address(), anchor_window::launch(), portable::launch_process(), ListACL(), ListNamedValueSD(), bitmap::load_from_file(), library_plugins::dynamic_library_loader::load_library(), library_plugins::dynamic_library_loader::load_method(), key_repository::lock(), buffer_manager::lock_buffer(), file_transfer_tentacle::lock_directory(), socket_minder::lock_socket_data(), octopus::lock_tentacle(), life_maintainer::locking_find(), debugger::log(), service_root::log_event(), query_handler::login_to_database(), main(), MakeSDAbsolute(), nodes::tree::iterator::next(), tentacle::next_request(), amorph< contents >::next_valid(), nodes::safe_list_read_iterator::observe(), nodes::list::iterator::observe(), off_screen_dc::off_screen_dc(), tiny_shell::OnClose(), tiny_shell::OnCreate(), byte_filer::open(), scheduler::open_iterator(), nodes::objcat_iterator::open_locket(), test_rpc_server::open_rpc(), deep_array< contents >::operator=(), argument_list::operator=(), deep_array< contents >::overwrite(), bitmap::paint(), palette::palette(), nodes::path::pop(), zing_table::pop_event(), mouse::position(), bookmark_tree::process_category(), process_manager::process_manager(), tentacle::propel_arm(), nodes::tree::prune_index(), service_control::reconfigure_service(), login_tentacle::reconstitute(), file_transfer_tentacle::reconstitute(), unwrapping_tentacle::reconstitute(), encryption_tentacle::reconstitute(), tentacle_helper< unhandled_request >::reconstitute(), identity_tentacle::reconstitute(), nodes::packable_tree::recursive_pack(), nodes::packable_tree::recursive_unpack(), post_office::register_route(), service_root::remove(), nodes::safe_list::remove(), nodes::list::remove(), directory_tree::remove_path(), octopus::remove_tentacle(), RemovePrincipalFromACL(), RemovePrincipalFromNamedValueSD(), rendezvous::rendezvous(), palette::reset(), bitmap::reset(), array< contents >::resize(), octopus::restore(), deep_array< contents >::restore(), run_test_02(), nodes::safe_list_read_iterator::safe_list_read_iterator(), nodes::safe_list_write_iterator::safe_list_write_iterator(), directory_tree::seek(), raw_socket::select(), nodes::object_catalog::separate(), RSA_crypto::set_key(), anchor_window::setup(), socket_minder::socket_minder(), scheduler::start_scheduling(), test_rpc_client::start_timer(), drawing_window::start_timer(), stdio_redirecter::std_thread_action(), string_manipulation::string_to_hex(), array< contents >::subarray(), cromp_client::synchronous_request(), portable::system_error_text(), test_byte_array_amorph(), timer_driver::timer_driver(), nodes::tree::tree(), buffer_manager::unlock_buffer(), octopus::unlock_tentacle(), basis::unpack(), basis::unpack_simple(), WHACK(), WIdentityPalette::WIdentityPalette(), cromp_server::wrap_infoton(), stdio_redirecter::write(), stdio_redirecter::zap_program(), octopus::zap_tentacle(), ZapNamedValueSD(), anchor_window::~anchor_window(), array< contents >::~array(), bitmap::~bitmap(), cromp_common::~cromp_common(), cromp_server::~cromp_server(), library_plugins::dynamic_library_loader::~dynamic_library_loader(), example_rpc_server::~example_rpc_server(), infoton_id_pair::~infoton_id_pair(), istring::~istring(), linked_buffer::~linked_buffer(), locked_logger::~locked_logger(), query_handler::~query_handler(), reader_writer_lock::~reader_writer_lock(), rendezvous::~rendezvous(), nodes::safe_list_read_iterator::~safe_list_read_iterator(), nodes::safe_list_write_iterator::~safe_list_write_iterator(), schedule_iterator::~schedule_iterator(), semaphore::~semaphore(), service_root::~service_root(), shared_memory::~shared_memory(), static_memory_gremlin::~static_memory_gremlin(), and timer_driver::~timer_driver().

#define NULL   0

See NIL.

Definition at line 64 of file definitions.h.

Referenced by managed_object< contents >::access(), add_include(), bitmap_tree::ClearMultiSelect(), basic_window::create(), CreateNewSD(), define2(), deftype(), file_differ::diff_files(), wx_debugging_console_panel::display_debug_message(), bitmap_tree::DoForAllSelected(), fdefined(), nodes::ordered_list::find(), find_includes(), CNSFlexPropertyPage::GetDocument(), getfile(), getline(), GetNamedValueSD(), GetPrincipalSID(), GetRunAsPassword(), CNSFlexPropertyPage::GetView(), included_by(), isdefined(), ListACL(), main(), managed_object< contents >::managed_object(), newinclude(), managed_object< contents >::observe(), bitmap_tree::OnBeginDrag(), bitmap_tree::OnDelete(), CNSFlexPropertySheet::OnInitDialog(), CNSFlexPropertyPage::OnInitDialog(), bitmap_tree::OnKey(), bitmap_tree::OnLButtonUp(), bitmap_tree::OnMouseMove(), CNSFlexPropertySheet::OnPageSetActive(), debugging_console_view::OnPrepareDC(), CNSFlexPropertySheetView::OnSize(), bitmap_tree::OnTimer(), managed_object< contents >::operator=(), managed_object< contents >::operator==(), pause_indicator::pause_indicator(), pr(), pause_indicator::reassert(), redirect(), basic_window::register_class(), remove_dotdot(), bitmap_tree::SelectRange(), earth_time::set_time(), SetAccountRights(), SetNamedValueSD(), SetRunAsPassword(), shared_memory::shared_memory(), portable::show_normal_cursor(), portable::show_wait_cursor(), slookup(), bitmap_tree::SortTree(), bitmap_tree::start_timer(), common_database_support::syb_err_handler(), common_database_support::syb_msg_handler(), SystemMessage(), bitmap_tree::ToggleTree(), undefine(), uuread(), windows_reboot(), WinMain(), managed_object< contents >::~managed_object(), and pause_indicator::~pause_indicator().

#define PI_APPROX   3.14159265358

An approximation of the fundamental circular constant.

Definition at line 74 of file definitions.h.

Referenced by geometric::ellipse::area(), geometric::circle::area(), geometric::circle::circumference(), geometric::circle::dimensions(), and geometric::ellipse::perimeter().


Typedef Documentation

typedef unsigned char byte

A fairly important unit which is seldom defined...

Definition at line 86 of file definitions.h.

typedef char flexichar

Definition at line 94 of file definitions.h.

typedef signed short int16

Definition at line 158 of file definitions.h.

typedef signed long int32

Definition at line 160 of file definitions.h.

typedef char int8

Definition at line 156 of file definitions.h.

typedef unsigned int u_int

Abbreviated name for unsigned integers.

Definition at line 99 of file definitions.h.

typedef unsigned long u_long

Abbreviated name for unsigned long integers.

Definition at line 107 of file definitions.h.

typedef unsigned short u_short

Abbreviated name for unsigned short integers.

Definition at line 103 of file definitions.h.

typedef unsigned short uint16

Definition at line 159 of file definitions.h.

typedef unsigned long uint32

Definition at line 161 of file definitions.h.

typedef unsigned char uint8

Definition at line 157 of file definitions.h.


Function Documentation

const char* software_product_name (  ) 

This global function is available to the system at large for branding info.

if this macro is turned on, then the features can "know" that the hoople libraries are available to them. some objects are structured such that they can be pulled out and dropped in anywhere. (not yet)

Definition at line 24 of file definitions.cpp.

Referenced by hoople_api::low_level_methods::make_allusers_path(), and ini_configurator::name().

double TERABYTE (  )  [inline]

Number of bytes in a terabyte.

Implemented as a function to avoid annoying link errors for double floating point constants in some compilers.

Definition at line 183 of file definitions.h.

References GIGABYTE, and KILOBYTE.


Variable Documentation

int __argc

Referenced by version_stamper::execute(), and command_line::get_command_line().

char** __argv

Referenced by version_stamper::execute(), command_line::get_command_line(), HOOPLE_GLOBALS(), and shutdown_alerter::launch_console().

const int DAY_ms = 24 * HOUR_ms

Number of milliseconds in a day.

Definition at line 171 of file definitions.h.

Referenced by portable::system_uptime().

const int DAY_s = 24 * HOUR_s

Number of seconds in a day.

Definition at line 176 of file definitions.h.

const int GIGABYTE = MEGABYTE * KILOBYTE

Number of bytes in a gigabyte.

Definition at line 182 of file definitions.h.

Referenced by TERABYTE().

const int HOUR_ms = 60 * MINUTE_ms

Number of milliseconds in an hour.

Definition at line 170 of file definitions.h.

Referenced by portable::system_uptime().

const int HOUR_s = 60 * MINUTE_s

Number of seconds in an hour.

Definition at line 175 of file definitions.h.

const int KILOBYTE = 1024

Number of bytes in a kilobyte.

Definition at line 180 of file definitions.h.

Referenced by entity_data_bin::acquire_for_entity(), throughput_counter::kilobytes_per_second(), throughput_counter::megabytes_per_second(), TERABYTE(), and memory_limiter::text_form().

const int MEGABYTE = KILOBYTE * KILOBYTE

Number of bytes in a megabyte.

Definition at line 181 of file definitions.h.

Referenced by recursive_file_copy::copy_hierarchy(), and run_test_32().

const int MINUTE_ms = 60 * SECOND_ms

Number of milliseconds in a minute.

Definition at line 169 of file definitions.h.

Referenced by recursive_file_copy::copy_hierarchy(), main(), grid_processor::process_grid_files(), and portable::system_uptime().

const int MINUTE_s = 60

Number of seconds in a minute.

Definition at line 174 of file definitions.h.

const int SECOND_ms = 1000

Number of milliseconds in a second.

Definition at line 168 of file definitions.h.

Referenced by throughput_counter::bytes_per_second(), shutdown_alerter::launch_console(), main(), smtp_client::send_email(), and time_stamp::text_form().


Generated on Fri Nov 28 04:29:55 2008 for HOOPLE Libraries by  doxygen 1.5.1